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
Add a comment  | 

1 Answer 1

Reset to default 0

Error : 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