C
C#7mo ago
P R Deltoid

Setting up MAUI example project, project won't build

I am trying to set up my environment to play around with the MAUI samples here: https://github.com/dotnet/maui-samples I cloned the repo, navigated to maui-samples\8.0\Apps\WeatherTwentyOne\src\ and opened the .sln file there in Rider. I ran dotnet workload restore per Rider's prompting and it installed the required workloads. But when I run the project using the UWP configuration, I receive this error:
Microsoft.PackageDependencyResolution.targets(266, 5): [NETSDK1005] Assets file 'C:\Users\Taylor\Code\c-sharp\maui-samples\8.0\Apps\WeatherTwentyOne\src\WeatherTwentyOne\obj\project.assets.json' doesn't have a target for 'net8.0-windows10.0.19041.0'. Ensure that restore has run and that you have included 'net8.0-windows10.0.19041.0' in the TargetFrameworks for your project.
Microsoft.PackageDependencyResolution.targets(266, 5): [NETSDK1005] Assets file 'C:\Users\Taylor\Code\c-sharp\maui-samples\8.0\Apps\WeatherTwentyOne\src\WeatherTwentyOne\obj\project.assets.json' doesn't have a target for 'net8.0-windows10.0.19041.0'. Ensure that restore has run and that you have included 'net8.0-windows10.0.19041.0' in the TargetFrameworks for your project.
I also have the same error for the net8.0-android , net8.0-ios , and net8.0-maccatalyst targets. What am I doing wrong here?
GitHub
GitHub - dotnet/maui-samples: Samples for .NET Multi-Platform App U...
Samples for .NET Multi-Platform App UI (.NET MAUI) - dotnet/maui-samples
1 Reply
P R Deltoid
P R DeltoidOP7mo ago
Needed to run a nuget restore as well. Problem (mostly) solved.
Want results from more Discord servers?
Add your server