Click here to Skip to main content
13,863,433 members
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

27.4K views
8 bookmarked
Posted 2 Sep 2013
Licenced CPOL

What are Portable Class Libraries?

, 2 Sep 2013
Rate this:
Please Sign up or sign in to vote.
In this section, we will discuss the importance of portable class libraries.

The whole point of creating a class library project is reusability. Now we want this reusability not only within a .NET application, not across .NET applications, but across different types of .NET applications. Now different types of .NET applications means WPF, Windows, Silverlight, Windows phone, etc.

Now each one of these applications run on different platforms and have different flavors of .NET Frameworks. For example, Silverlight application runs inside a browser and has a downsized version of .NET.

So in a Silverlight application, if you try to reference a simple “Class project”, you would end up with the below error. That’s where portable class libraries are useful. By creating a portable class, we can reference it in any kind of .NET project types.

To create a portable class, we need to use the portable class template which is available in Visual Studio as shown in the below figure:

Below is a simple youtube video which demonstrates what is a Portable Class library in C#.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author


You may also be interested in...

Pro

Comments and Discussions

 
GeneralGood info Pin
R.Hari Prasath13-Sep-13 0:40
memberR.Hari Prasath13-Sep-13 0:40 
GeneralMy vote of 5 Pin
GutierrezDev2-Sep-13 11:31
memberGutierrezDev2-Sep-13 11:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01 | 2.8.190214.1 | Last Updated 3 Sep 2013
Article Copyright 2013 by Shivprasad koirala
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid