My pipeline is currently stuck due to this, I have a simple "dotnet install" in my pipeline that used to work and since the latest .NET SDK release (SDK 9.0.307) it started to fail with the following message:
- C:\Users\?????\.nuget\packages\telerik.licensing\1.4.10\build\Telerik.Licensing.targets(8,3): error MSB4216: Could not run the "ResolveTelerikProducts" task because MSBuild could not create or connect to a task host with runtime "NET" and architecture "x64". Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:\Program Files\dotnet\sdk\9.0.307\MSBuild.dll" exists and can be run.
I attempted to upgrade the Telerik.Licensing package manually to latest version but it didn't fix the issue.
Same problem.
error MSB4216: Could not run the "ResolveTelerikProducts" task because MSBuild could not create or connect to a task host with runtime "NET" and architecture "x64".
However, I don't get the error if I publish via VS2022.
But if I execute the following command, I get the above error.
dotnet publish ..\UiWebBlazor\Web\Web.csproj --output Publish\UiWeb -c Debug -r linux-arm64 --self-contained false
Pinning to 9.0.306 (instead of 9.0.307 that was just released today) seems to have at least worked around the issue for now.
Add global.json with the following:
{"sdk": {
"version": "9.0.306"
}
}