Click here to Skip to main content
15,920,896 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I work on visual studio 2019 when create new project with .NET core web application it display to me as .NET core 2.1
i need to create new project on visual studio 2019 with .NET core 5.0
so what i do to display .net core 5.0 when create new web application project with .net core

What I have tried:

i install dotnet-sdk-5.0.408-win-x64 and then run
dotnet --version
it display
C:\Users\MBR>dotnet --version
and restart my pc after install sdk 5.0
then create new project it still .net core 2.1
so how to upgrade from .net core 2.1 to 5.0
Updated 22-Oct-22 6:45am
Dave Kreskowiak 22-Oct-22 12:30pm    
What was the command line you used to create the project, and in which folder did you run the command?

1 solution

Chances are you have a global.json file somewhere in directory path you ran the command in that is forcing the 2.x version of .NET.

Select which .NET version to use - .NET | Microsoft Learn[^]
global.json overview - .NET CLI | Microsoft Learn[^]
global.json overview - .NET CLI | Microsoft Learn[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900