Azure Web App对.NET Framework 4.8.1的支持|在云中获取生成错误,因为目标是v4.8.1



.NET Framework 4.8.1版本于今年8月发布。Azure Web Apps何时支持它?

我升级了一个针对v4.8.1的多个项目的解决方案。在我的本地机器上构建很好——没有错误;然而,当我尝试通过ADO中的管道进行构建时,我得到了错误:

##[error]C:Program Files (x86)Microsoft Visual Studio2019EnterpriseMSBuildCurrentBinMicrosoft.Common.CurrentVersion.targets(1217,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.8.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

也许这是我俯瞰的一个场景?

.NET Framework 4.8.1已安装在Microsoft托管代理windows-latestwindows-2022中。此处对此进行了记录。

因此,如果您使用的是Microsoft托管代理windows-2019,请尝试使用windows-latestwindows-2022

此外,另一种解决方案是使用自托管代理。这将把您的本地计算机设置为代理,以便您在管道中使用的所有软件都来自本地计算机。

更新:

请尝试在管道的开头添加NuGet Tool安装程序任务。这是一个例子:

- task: NuGetToolInstaller@1
inputs:
versionSpec: '5.8.0'

此任务可以查找、下载和缓存指定版本的NuGet,并将其添加到PATH中。

相关内容

最新更新