I with this command:
dotnet new mvc
creating an ASP.NET Core MVC project in VS Code, but since SDK version 7 is installed on my computer, the project is created with version 7.
How should I create a project with .NET Core 3.1 version?
I with this command:
dotnet new mvc
creating an ASP.NET Core MVC project in VS Code, but since SDK version 7 is installed on my computer, the project is created with version 7.
How should I create a project with .NET Core 3.1 version?
2
Answers
In your .csproj file, you can set
<TargetFramework>netcoreapp3.1</TargetFramework>
You can use the parameter
--framework
for specifying the version. Ex – if you want to build in .NET 6.0. The command will bedotnet new mvc --framework net6.0