C
C#13mo ago
Airsicktitan

✅ The current .NET SDK does not support targeting .NET 8.0. Either Target .NET 6.0 or lower

I am pretty new to C# and web app development with it. I do SQL database management as my day job. I saw that .NET 8 Blazor Web App was released today and I wanted to try it out! But unfortunately, when I spin up the template.... I get the error listed in the title. I've updated my Visual Studio 2022 IDE, and I've installed .NET 8 SDK. What can I do to resolve this issue? Thank you in advanced!
24 Replies
333fred
333fred13mo ago
What does dotnet --list-sdks say from the command line?
Airsicktitan
AirsicktitanOP13mo ago
These are the ones I've got
No description
333fred
333fred13mo ago
Hmm. And you've installed VS 17.8?
Airsicktitan
AirsicktitanOP13mo ago
No description
Airsicktitan
AirsicktitanOP13mo ago
Indeed, I've updated and did a restart on the machine as well
Airsicktitan
AirsicktitanOP13mo ago
No description
333fred
333fred13mo ago
What exactly are the steps you're taking to create the project?
Airsicktitan
AirsicktitanOP13mo ago
Then I hit Create and let it create
No description
No description
No description
No description
Airsicktitan
AirsicktitanOP13mo ago
Lol, oops, forgot to hide the location so was pointless to hide the "project will be created in" lol, oh whale But, just running the default setup basically
333fred
333fred13mo ago
Does dotnet build from the command line work? Other things to check: do you have a global.json in or above the project folder that specifies a lower sdk version?
Airsicktitan
AirsicktitanOP13mo ago
Do I need to update that file to 8?
No description
333fred
333fred13mo ago
Yup
Airsicktitan
AirsicktitanOP13mo ago
Or rather, 8.0.1? Ok, lemme update that one moment
333fred
333fred13mo ago
Or just delete it entirely
Airsicktitan
AirsicktitanOP13mo ago
Ok, let me delete it and rebuild
333fred
333fred13mo ago
What that file says is "for any invocation of dotnet under this folder, use the 6.0.0 SDK, rolling forward to the latest minor version of 6 if available"
Airsicktitan
AirsicktitanOP13mo ago
I see, so I've deleted the Global.Json Now I am able to run the template app! 😛 Will I need to rebuild a global.json file again? Or it'll auto rebuild if it needs one?
333fred
333fred13mo ago
You don't need one, I don't know why you had one For most people, all that will do is cause pain
Airsicktitan
AirsicktitanOP13mo ago
Could it be because I was using an old tutorial using ASP.Net Web Application (.NET Framework)?
333fred
333fred13mo ago
Probably not
Airsicktitan
AirsicktitanOP13mo ago
Hm, donno how I generated the .json file, lol But, I have a note now to check that location if I get that error again to remove it all together. .Net MAUI doesn't generate .json either right? Lol I am planning on noodling around with that template as well, see what's new and all that good stuff
333fred
333fred13mo ago
It shouldn't, but I wouldn't worry about it too much right now If you have no more questions, feel free to $close the thread 🙂
MODiX
MODiX13mo ago
Use the /close command to mark a forum thread as answered
Airsicktitan
AirsicktitanOP13mo ago
Great thank you! I am going to close this thread, as it's sovled I appreciate the help!!
Want results from more Discord servers?
Add your server