all groups > dotnet compact framework > november 2007 >
You're in the

dotnet compact framework

group:

use same files for CE and XP projects in Studio 2005


use same files for CE and XP projects in Studio 2005 Werner
11/30/2007 2:36:00 AM
dotnet compact framework: 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
Re: use same files for CE and XP projects in Studio 2005 ctacke/
11/30/2007 8:36:59 AM
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 Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com


[quoted text, click to view]

Re: use same files for CE and XP projects in Studio 2005 joker
11/30/2007 8:42:03 AM
Chris, can you elaborate on how you use the partial classes? Would
they be in separate dll's?


[quoted text, click to view]
Re: use same files for CE and XP projects in Studio 2005 ctacke/
11/30/2007 10:50:11 AM
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






[quoted text, click to view]

Re: use same files for CE and XP projects in Studio 2005 Daniel Moth
12/1/2007 2:25:34 PM
Thanks Chris.

This article has most of the info from my blog (inc. translations for 11
languages):
http://msdn.microsoft.com/msdnmag/issues/07/07/ShareCode/default.aspx

Cheers
Daniel
--
http://www.danielmoth.com/Blog

[quoted text, click to view]
AddThis Social Bookmark Button