There are different types of Class libraries available in Visual Studio such as Silverlight Class Library, Portable Class library and Class Library. What are the differences between these types? How can we determine the type of a Class library with File.dll
file? How can we change a Class library from own type to another type of Class library?
The Portable Class Library project enables you to write and build managed assemblies that work on more than one . NET Framework platform. You can create classes that contain code you wish to share across many projects, such as shared business logic, and then reference those classes from different types of projects.
The difference between a shared project and a class library is that the latter is compiled and the unit of reuse is the assembly. Whereas with the former, the unit of reuse is the source code, and the shared code is incorporated into each assembly that references the shared project.
A class library is a collection of class definitions contained in a . dll or .exe file. In order to use the class library, you must first add a reference to the library (see "How to add references to your Visual Studio Project").
NET Standard is platform-agnostic, it can run anywhere, on Windows, Mac, Linux and so on. PCLs can also run cross-platform, but they have a more limited reach. PCLs can only target a limited set of platforms.
The Portable Class Library project type enables you to write and build managed assemblies that work on more than one Microsoft platform, whereas the "normal" Class Library project type doesn't.
"Microsoft platforms" include .NET Framework, Windows Phone, .NET for Windows Store Apps, Silverlight, Xbox; all in various versions or flavors.
Source
Go through this for converting from one class library to another type. (See also: this relevant SO question.)
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