I'd like certain data functionality to be shared between my .NET desktop application and .NET CF app.
Is it possible to create a universal library accessible by both versions of the application or I need to create two separate DLL's?
Yes--the desktop .NET runtime knows how to load and run .NET CF DLLs, so your first step would be to build your library for the Compact Framework.
You'll find that from time to time you'll want to use features of the Desktop framework, and you can pull those in using reflection.
Here's a very through intro to the process in MSDN Magazine.
NOTE: If it's possible for your mobile and desktop versions to share code but not the .dll specifically, then you'll have an easier time building this and staying happy if you use conditional compilation instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With