Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

different between class library and portable class library in visual studio

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?

like image 782
mehdi lotfi Avatar asked Jun 29 '13 10:06

mehdi lotfi


People also ask

What is portable 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.

What is the difference between the portable class library and shared 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.

What is class library in Visual Studio?

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").

What is the difference between .NET Standard and PCL portable class libraries?

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.


1 Answers

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.)

like image 154
Jayram Avatar answered Oct 09 '22 20:10

Jayram