use same files for CE and XP projects in Studio 2005

  • Thread starter Thread starter Werner
  • Start date Start date
W

Werner

Hello

Id like to use the same C#-source files for an Windows XP and
Windows CE project with studio 2005.
What is to your expireince the easiest way to do this?


Thanks
Werner
 
Simply add the files as links to each project. I often use partial classes
to keep device and desktop specific code for the same class separated.
Daniel Moth blogged a lot of info on sharing code between the device and
desktop - you might look at that.
 
Chris, can you elaborate on how you use the partial classes? Would
they be in separate dll's?
 
It all depends on what you're doing and how you intend to use the source.

Partial classes are nice if you have source that's getting compiled into
both a device and a desktop app. I have one file that contains code common
to both, one that contains device-only stuff and another that contains
desktop-only stuff. The CF project includes 2 of the file (core and device)
and the desktop project includes 2 (common and desktop).

Again, Daniel Moth covered a lot of this in a lot of depth on his blog.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
 
Back
Top