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
- 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
- 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
- Compile the class library to see if there are any issues
- Add the Windows Phone assemblies as needed
- For Windows Phone specific issues, use #if WINDOWS_PHONE directives
You can see two open source projects that do that here:
- New York Times Silverlight Kit
- Microsoft Silverlight Analytics Framework
精彩评论