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)
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With