I have a build which works fine locally (VSCode, .NET Core 3.1.101) but fails with the following message when run in an Azure DevOps Pipeline.
My pipeline is stripped down to the most basic:
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
And that results in this error message:
Version 3.1.101 of the .NET Core SDK requires at least version 16.3.0 of MSBuild. The current available version of MSBuild is 15.9.21.664. Change the .NET Core SDK specified in global.json to an older version that requires the MSBuild version currently available.
I can't find a way to change the version of MSBuild that the pipeline runs and changing to an older version of .NET Core surely defeats the purpose of upgrading?
Is there any way to build a.NET Core 3.1 solution on Azure DevOps?