I just updated my solution to .NET7. I have a build/release pipeline setup on Azure Devops which now fails in the "Restore" step.
This is first error, which is then followed by multiple other errors of the same type:
2:3>Target "_CheckForUnsupportedNETCoreVersion" in file "C:\Program Files\dotnet\sdk\6.0.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets" from project "D:\a\1\s\xxxx\xxxx.csproj" (target "CollectPackageReferences" depends on it): Using "NETSdkError" task from assembly "C:\Program Files\dotnet\sdk\6.0.402\Sdks\Microsoft.NET.Sdk\targets..\tools\net6.0\Microsoft.NET.Build.Tasks.dll". Task "NETSdkError" 2:3>C:\Program Files\dotnet\sdk\6.0.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [D:\a\1\s\xxxx\xxxx.csproj] Done executing task "NETSdkError" -- FAILED.
I've tried using both "Windows Latest" and "Windows 2022" under "Agent specification" but neither works. I would have thought that "Windows Latest" would get automatically updated to the latest SDK once it's released? What do I have to change to make this build pipeline work with .NET7?