Windows Phone 7: Existing libraries not supported?

I was hoping this was as simple as linking to my existing libraries to use them with WP7. However, he complains that he cannot load them because of .Net CF when I actually use them.

Do I need to recompile them into .NET CF or something like that?

I thought WP7 was a big plus: using the existing codebase ...? How can I use the existing code base if I need to remove all of it and support multiple versions?

+6
windows-phone-7 compact-framework
source share
3 answers

Yes, you need to run the Windows phone library (which has links to netcf bcl) ... you can add most of your files as links to links. This allows you to modify one source file, and each platform will automatically update after compilation.

Take a look at some of the XNA tutorials / videos that talk about how to use cross-platform games for an example of how to do this.

+1
source share

The .NET Compact Framework is a subset of the full .NET Framework with some additional features for developing mobile devices. If you want to compile a library for Windows and Windows Phone, you need to create your own code for each platform.

You can still use most of the same code that you used for your .NET library, but you will need to use preprocessor symbols and conditional compilation to eliminate functionality for the desktop (or phone) that is not supported in another environment.

To do this: create two projects. One project will contain all your files designed for the desktop framework. Another will contain linked versions of your files for a compact structure. You can define characters in each project to run conditionally compiled blocks of code.

This means that any investment you have already made in .NET will be easily transferred to the Windows Phone world, but you must also be sure that the performance characteristics of your library will be easily supported by a less powerful device.

Good luck

+1
source share
0
source share

All Articles