Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight class library to Windows phone 7 class library

Does anyone know of a tool or a way within Visual Studio 2010 to convert a Silverlight 4 class library project to a Windows Phone 7 Class Library project?

I could resort to copying and pasting class files, but if I can avoid that with a conversion tool, that would save all kinds of time.

Steve

like image 959
Steve Danner Avatar asked Feb 02 '26 14:02

Steve Danner


1 Answers

  1. Create a new class library for Silverlight for Windows Phone 7 using the project template in Visual Studio 2010/Express with the Windows Phone Developer Tools installed
  2. For each of the source files in the class library, use the option to Add an Existing Item... and the use the Add As Link option in the Add button
  3. Compile the class library to see if there are any issues
  4. Add the Windows Phone assemblies as needed
  5. For Windows Phone specific issues, use #if WINDOWS_PHONE directives

You can see two open source projects that do that here:

  1. New York Times Silverlight Kit
  2. Microsoft Silverlight Analytics Framework
like image 130
Michael S. Scherotter Avatar answered Feb 05 '26 02:02

Michael S. Scherotter