Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create a .NET program using the new CSPROJ format in VS2017 (Or VS2019)

There's some great tools for converting the old CSPROJ format to the new CSPROJ format, such as this one. The new format supports things like direct references to NuGet packages and other cool stuff.

However, how do you create a brand new project in Visual Studio 2017 or Visual Studio 2019? If I create a .NET library project:

enter image description here

Then this project is created in the old format and has to be upgraded using the tool again. Can anyone shed some light on what projects support the new format vs. the old format?

like image 912
Mike Christensen Avatar asked Oct 24 '19 18:10

Mike Christensen


People also ask

What is Csproj file in asp net core?

csproj file tells dotnet how to build the ASP.NET application. It's one of the most important files in an ASP.NET project. An ASP.NET project can depend on third-party libraries developed by other developers. Usually, these libraries are installed as Nuget packages using Nuget package manager.


Video Answer


1 Answers

The new CSPROJ is used by .NET Core and automatically created when creating new .NET Core project.

The trick that I have uses to to create a new style .NET Framework under Rider is (as suggested by a colleague):

  1. create a .NET Core project
  2. switch it to a .NET Framework

I think that this works only under VS.

like image 178
Francesco Montesano Avatar answered Nov 15 '22 07:11

Francesco Montesano