11
votes

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)

4
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 - David Ferretti
Though I'm not sure if that is built into VS2015 update 3 or if that came when I installed the .net core tooling preview 2 - David Ferretti
Seems to do the trick for now, will gladly accept as answer - Thomas

4 Answers

7
votes

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

1
votes

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.

0
votes

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

0
votes

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