ree*_*ee6 22 yaml build-server azure-devops azure-pipelines azure-pipelines-yaml
我有一个用于我的构建的 Azure 管道设置。我最近遇到了这个问题,但找不到解决方法:
##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1220,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.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
Run Code Online (Sandbox Code Playgroud)
大约一周前,我们的许多构建都失败了,微软改变了一些东西,我们得到了这样的东西:
[error]C:\Users\VssAdministrator\.nuget\packages\codegeneration.roslyn.buildtime\0.6.1\build\CodeGeneration.Roslyn.BuildTime.targets(73,5): Error CGR1001: CodeGeneration.Roslyn.Tool (dotnet-codegen) is not available, code generation won't run. Please check https://github.com/AArnott/CodeGeneration.Roslyn for usage instructions.
Run Code Online (Sandbox Code Playgroud)
但是能够通过显式添加一个任务来包含 netcore2.1 sdk 来解决这个问题
##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1220,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.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
Run Code Online (Sandbox Code Playgroud)
现在这个问题已得到解决,我们现在遇到了错误,抱怨找不到 .NET Framework 4.6.1。
无论如何,任何想法发生了什么,这都让我大吃一惊——任何建议或见解都非常感谢。
Jan*_*SFT 29
4.6.1Azure DevOps Microsoft 托管代理已弃用.Net Framework 版本。目前,有两种 Microsoft 托管代理:
windows-2019或者windows-latest:.Net Framework 版本4.7.2并4.8预安装。此处记录了这一点。
windows-20224.8:预装.Net框架版本。此处记录了这一点。
也就是说,您需要使用自托管代理4.6.1才能在管道中使用.Net框架。
小智 11
从代理池 - 将代理规范从 Window-Latest 更改为 Window-2019 ,看来 MS 对默认代理做了一些更改

| 归档时间: |
|
| 查看次数: |
10422 次 |
| 最近记录: |