Reputation: 161
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).
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
Upvotes: 2
Views: 1776
Reputation: 101
For me what helped was I shut down Visual Studio, then I opened a PowerShell terminal, I navigated to the folder that had my solution folder then I ran the command
dotnet workload restore
it then downloaded some files and installed them after accepting the UAC. This took a while. After the workload was restored, I ran the command
dotnet build --configuration Release
I needed to build in release, but u can just leave out the --configuration Release to build in debug
After that, I opened the solution in Visual Studio and my project was ok. Hope it helps
Upvotes: 1