A few days back I was working on a Windows Phone application and as usual I created a class library project for keeping separate business logins. But I realize we cannot add as a reference a normal class library in the Windows Phone 7 Application.
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 various types of projects more.
To install the Portable Class Library in your machine you can use Visual Studio 2010, save the download file (PortableLibraryTools.exe) on your computer, and run the installation program from a Command Prompt window. Include the /buildmachine switch on the command line.
The following assemblies are used for a Portable Class Library:
System.Windows.dll (from Silverlight)
The following are the steps to create a Portable Class Library in Visual Studio 2011.
Step 1: Create a new project and choose Portable Class Library.
Step 2: Now go to project properties and select Library tab and click on the change button; you will see the Change Target Framework Dialog box; there you can select the framework for your library.