Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

like image 341
Thomas Avatar asked Aug 03 '16 23:08

Thomas


People also ask

What is NET Platform Standard?

Here comes .NET Platform Standard as Unified Base Class Library which runs on all .NET platforms. Previously named .NET Platform, Standard is a set of APIs that work on all .NET runtimes. Code-sharing problem is now more simplified by .Net Standard. We can simply replace Portable Class Library (PCL) with .Net Standard.

How to develop a web application entirely in netstandard2?

In order to develop your web application entirely in netstandard2.0, you would have to create a separate project that targets either .NET Core or .NET Framework to execute your library that contains your web app (developed using .NET Standard). 1. Executable Project (ex: console app) -- Target Framework: netcoreapp2.0 / net462 2.

How to create a standard project in Visual Studio 2017?

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. You can also create new .NET Platform Standard projects from a template by using Visual Studio 2017 RC.

How do I create a class library project in Visual Studio?

Create a class library project. You can use an existing .NET Standard Class Library project for the code you want to package, or create a simple one as follows: In Visual Studio, choose File > New > Project, expand the Visual C# > .NET Standard node, select the "Class Library (.NET Standard)" template, name the project AppLogger, and click OK.


1 Answers

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

like image 74
ccoutinho Avatar answered Oct 21 '22 01:10

ccoutinho