Portable Class Library - Visual Studio 2012

Portable Class Library is a new feature which is part of Visual Studio 2012 and enables you to develope cross platform applications.


Usually a traditional class library in .NET is capable of targeting only one framework ver.  But many times you may want to build a class library which can target multiple versions of framework. I.e. the objective is to achieve cross-platform development of .NET Framework applications. This became a possibility with the release of Visual Studio 2012.

Visual Studio 2012 includes a new project template named Portable Class Library, As you can see in the image below,  you can use this project to build portable assemblies that work without modification on multiple platforms like:

1-      Windows 7, Windows 8

2-      Silverlight

3-       Windows Phone, and

4-       Xbox 360

PortableClassLibrary1.jpg

This project is pretty much like a Class Library project, except its References shows “.NET Portable Subset” instead of individual namespaces.

 

PortableClassLibrary2.jpg

 

If you are targeting only one particular framework as many enterprise applications do, then standard Class Library project is the best choice.