Reputation: 93
After installing VS 2022 for Mac (Apple Silicon), it looks like the bundled version of MSBuild does not work with VS ?!?
When opening a solution, VS reports the following error:
Unable to find SDK ‘Microsoft.NET.SDK.WorkloadAutoImportPropsLocator’. SDK not found Version 6.0.300 of the .NET SDK requires at least version 17.0.0 of MSBuild. The current available version of MSBuild is 16.10.1.27501. Change the .NET SDK specified in global.json to an older version that requires the MSBuild version currently available.
HW: Apple Mac Studio, M1 Max OS: macOS Monterey, 12.4 .Net SDK: 6.0.300 .Net Runtimes: Microsoft.AspNetCore.App 6.0.5 Microsoft.NETCore.App 6.0.5 MSBuild: 16.10.1 for Mono
Ive tried uninstalling / reinstalling several times, nothing changes. Is there a MSBuild version 17.x that can be manually downloaded/installed to fix this ?
Any help is much appreciated !
Upvotes: 9
Views: 6346
Reputation: 47967
If you have a mix of .NET and classic projects in a solution you may have problems building the solution with .NET 6.0.300 SDK installed.
To build classic projects MSBuild on mono has to be used, however that does not support .NET 6.0.300 so the .NET SDK is downgraded.
Possible workarounds:
If workaround 1) does not completely allow the solution to build then try workaround 2) which requires workaround 1 otherwise the project cannot be loaded.
Upvotes: 10