As .NET Core is getting nearer, I will start to convert our library to .NET Core from .NET Framework 4.5. But it is not clear what type my library should be; I don't have a ".NET Core" project type in Visual Studio 2015.
Do I need to use old school "PCL" Library? Or how do I do it?
But it is not clear what type my library should be; I don't have a ".NET Core" project type in Visual Studio 2015.
Do I need to use old school "PCL" Library? Or how do I do it?
Use the Web > Class Library (Package) type.
The screenshot is from Visual Studio Community 2015 Update 2 with ASP.NET 5 RC1 installed. Its project.json
targets two frameworks: .NET 4.5.1 and .NET 5.4 (renamed to .NET Core.)
{
// other properties deleted for clarity
"frameworks": {
"net451": { },
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Threading": "4.0.11-beta-23516"
}
}
}
}
Tip. When you're upgrading your class library, run the .NET Portability Analyser on the existing code. It will show the classes & members that must change.