admin管理员组文章数量:1200373
Currently using an agent pool hosted in a VM scale set for .Net deployments. Upgrading the code base to .NET 8 I get the following error in the msbuild step:
Error : Version 8.0.405 of the .NET SDK requires at least version 17.8.3 of MSBuild
I've updated the instances in the scale set to the latest versions and I've added a Use Dot Net Core step to specify .NET 8. I still get the error. Pipeline yaml is:
pool:
name: <<Pool Name>>
demands: msbuild
variables:
vsVersion: '17.0'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 8.0.x'
inputs:
version: 8.0.x
includePreviewVersions: true
- task: ms.advancedsecurity-tasks.codeql.init.AdvancedSecurity-Codeql-Init@1
displayName: 'Initialize CodeQL'
inputs:
enableAutomaticCodeQLInstall: true
languages: csharp
querysuite: 'security-and-quality'
- task: MSBuild@1
displayName: 'Build solution **/*.sln'
inputs:
msbuildArchitecture: x64
restoreNugetPackages: true
- task: ms.advancedsecurity-tasks.codeql.analyze.AdvancedSecurity-Codeql-Analyze@1
displayName: 'Perform CodeQL analysis'
inputs:
WaitForProcessing: true
Currently using an agent pool hosted in a VM scale set for .Net deployments. Upgrading the code base to .NET 8 I get the following error in the msbuild step:
Error : Version 8.0.405 of the .NET SDK requires at least version 17.8.3 of MSBuild
I've updated the instances in the scale set to the latest versions and I've added a Use Dot Net Core step to specify .NET 8. I still get the error. Pipeline yaml is:
pool:
name: <<Pool Name>>
demands: msbuild
variables:
vsVersion: '17.0'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 8.0.x'
inputs:
version: 8.0.x
includePreviewVersions: true
- task: ms.advancedsecurity-tasks.codeql.init.AdvancedSecurity-Codeql-Init@1
displayName: 'Initialize CodeQL'
inputs:
enableAutomaticCodeQLInstall: true
languages: csharp
querysuite: 'security-and-quality'
- task: MSBuild@1
displayName: 'Build solution **/*.sln'
inputs:
msbuildArchitecture: x64
restoreNugetPackages: true
- task: ms.advancedsecurity-tasks.codeql.analyze.AdvancedSecurity-Codeql-Analyze@1
displayName: 'Perform CodeQL analysis'
inputs:
WaitForProcessing: true
Share
Improve this question
edited Jan 21 at 19:10
marc_s
754k184 gold badges1.4k silver badges1.5k bronze badges
asked Jan 21 at 17:15
MasonMason
1
1 Answer
Reset to default 0Error : Version 8.0.405 of the .NET SDK requires at least version 17.8.3 of MSBuild
The error indicates the Visual studio version on the agent is old, you need Visual studio 2022 on agent, it has higher MSbuild version which meets the SDK requirements.
Since you are using VM scale set pool, you can update on your pool base image to have VS2022. it will apply to DevOps, the new agent will automatically have the new VS2022 by default.
If you only upgrade(install VS2022) on current agent instance, it doesn't propagate to other agents, and the current agent could be reimaged after one pipeline.
You can check the similar ticket for your reference, it used MS-hosted agent but error and solution is same.
本文标签: How do I update an Azure Devops agent pool using a VM scale set to build NET 8Stack Overflow
版权声明:本文标题:How do I update an Azure Devops agent pool using a VM scale set to build .NET 8 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738612503a2102714.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论