I've been trying to upgrade my Blazor MAUI projects to .net 8. I managed to get the back-end code to compile again but the Blazor MAUI code gives this error:
2>C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file 'C:\...\...\...\...\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 work on this porject on my own time, and I have been staring at this message for a couple of days now. I'm struggling to figure out how to solve it.
I tried:
- The microsoft upgrade utility, it doesn't do much differently if I look at the git changes it applied.
- I also tried to change the target framework from net8.0-android33.0 to net8.0-android (without the 33.0 suffix)
- I also tried to search if there is a replacement for net7.0-windows10.0.19041.0 that should be used instead of net8.0-windows10.0.19041.0
Please help.