I've been trying to get into .NET MAUI development but I've been having an uphill battle getting the workloads installed and working.
I've received several different errors, which I've resolved up to the point I'm at now. I don't know where to go from here with what I have for an error below. Scouring the Internet is drying up on leads.
The error I have at the moment happens anytime I try to open a project or reload the project (after it fails the first time).
The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found. C:\Program Files\dotnet\sdk\7.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props
I have done the following to try and resolve this (and also to resolve other errors I was receiving originally).
- Reinstalled the MAUI Workload using VS Installer
- Reinstalled VS entirely
- Reboots interspersed throughout the reinstall process for both the Workload and VS itself
- Reinstalled VS entirely and scanned Registry for straggler installs of .NET SDK components
- Set System Variable MSBuildSDKsPath to C:\Program Files\dotnet\sdk\7.0.302\Sdks
- Set System Variable MSBuildEnableWorkloadResolver to true
- Tried installing the MAUI Workload on a completely different system running Windows 10 (the first system was Win11) and experienced similar if not the same issues.
While some of the above pieces solved other issues I was having (specifically the MSBuildSDKsPath solved the most issues thus far), I don't know where to go from here.
Some resources I've already tried, if it helps
- https://learn.microsoft.com/en-us/dotnet/maui/troubleshooting
- .Net MAUI app not building due to missing workload but the workload is installed
- https://github.com/dotnet/sdk/issues/17461
- https://github.com/dotnet/installer/issues/10551
- MSBUILD throws error: The SDK 'Microsoft.NET.Sdk' specified could not be found