Home > Back-end >  How to create dotnet core project with lower version in vs code
How to create dotnet core project with lower version in vs code

Time:09-28

I with this command:

dotnet new mvc

creating a .net core mvc project in vs code, but since SDK version 7 is installed on my computer so the project is created with version 7. How should I create an mvc project with .net core 3.1 version?

CodePudding user response:

In your .csproj file, you can set <TargetFramework>netcoreapp3.1</TargetFramework>

CodePudding user response:

You can use the parameter --framework for specifying the version. Ex - if you want to build in .NET 6.0. The command will be dotnet new mvc --framework net6.0

  • Related