Thomas
Thomas

Reputation: 4297

How to create .NET Platform Standard project

I read up on the new .NET Platform Standard concept replacing the old Portable Class Libraries, which seems nice. However, I can't seem to figure out how to create such a library, yet.

Is there a Project Template for Visual Studio where I could choose the target generation / netstandard? Or do I have to manually change a PCL project.json file for this?

(Got VS15, Update 3 installed)

Upvotes: 12

Views: 8941

Answers (4)

ccoutinho
ccoutinho

Reputation: 4556

On Visual Studio 2019 it is possible to create projects that target .NET standard, just as you create another type of project. To do so, you just need to add new project, and then if you search for .net standard it will show several types of projects in which you can target .NET standard, as shown below.

enter image description here

Upvotes: 2

Tamer
Tamer

Reputation: 105

You can follow this Create .NET Standard Packages with Visual Studio 2015

From the article:

This guide will walk you through creating a nuget package targeting .NET Standard Library 1.4. This will work across .NET Framework 4.6.1, Universal Windows Platform 10, .NET Core, and Mono/Xamarin.

Upvotes: 1

Thomas
Thomas

Reputation: 4297

You can also create new .NET Platform Standard projects from a template by using Visual Studio 2017 RC.

Upvotes: 0

David Ferretti
David Ferretti

Reputation: 1400

If you create a PCL project and then double click properties, you should see an option to change your target platform. That will let you choose a .net standard version. Same thing as doing it yourself in the project.json but is the closest thing I have found so far to having a VS template do it for you

Upvotes: 8

Related Questions