Maybe a heads-up.
We’re moving from .net 5 to 6 and we just encountered this error.
We didn’t have issues before with this. We just noticed this after we added UseDotNet@2 to our pipeline.
I’m going to put some UseDotNet@2 in our pipeline like described, it would be great to also support .net 6
Freddy
For completeness, I’ve added this as a single block into our yaml and got SonarCloud to find the correct version by itself again and our tasks are using the .NET 6 SDK:
- task: UseDotNet@2
displayName: Use .NET 3.1
inputs:
packageType: 'sdk'
version: '3.1.x'
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.0.x'