Creating .NET 5 projects in Visual Studio WITHOUT editing the project file after creation

If you want to create a .NET 5 console or web app you’ll notice by default Visual Studio will create it as 3.1 without giving you the option to select .NET 5 even if its available. This is because .NET Core 3.1 is the latest LTS (long term support) version.

After project creation you can of course go into project settings and change it to .NET 5…

… BUT …

To have Visual Studio allow you select the framework version upfront when creating the project check out the highlighted option below in the Environment -> Preview Features settings screen.

Select .NET 5 when creating a new project in Visual Studio

Leave a Reply

Your email address will not be published. Required fields are marked *