visual-studiomauivisual-studio-projectvisual-studio-preview

Create Maui project is not available after installing .NET 9.0 Preview


I have installed .NET 9.0 Preview SDK from the official Microsoft website, then when I click on "Create a new project" .NET Maui option is not available. I had a Maui project that I created before installing .NET 9.0 when I opened it the solution explorer shows the message based on your solution you might need to install extra components for a full development experience. when I click on install, visual studio installer tells me "You already have the frameworks, SDKs and tools installed that you need for development work you selected. you can always add more by running 'Visual Studio Installer.'"

I have visual studio 2022 17.10.0 Preview 4. I have tried repairing visual studio and still having the same problem


Solution

  • Although that should not happen, you should be able to install them manually by opening up a terminal and running dotnet new install Microsoft.Maui.Templates.net9, then for other versions replace net9 with net8 or the version thats relevant for you.

    That should also make them show up in your Visual Studio.

    Its just another NuGet package, so you should be able to find what you need on NuGet.org, for example: https://www.nuget.org/packages/Microsoft.Maui.Templates.net9