Smart Device and Windows XP code reuse

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am writing for both Windows XP and Pocket PC an application that implements the same behavior. In the architecture design I am using several foundation libraries for better code reuse. The libraries are intended to work within the limits of the Compact framework so I can write a single source for both applications
My problem is that I can't find a way to make 2 compilation libraries for the Smart Device and the windows XP. I tried using 2 separate projects and use the same files but the IDE copied the files in to the new project folder instead of using the original files

Is there a better way to do it
Am I doing something wrong when "Adding an Existing Item" to the project

Daniel.
 
Hi Daniel:



--


Daniel Granatshtein said:
I am writing for both Windows XP and Pocket PC an application that
implements the same behavior. In the architecture design I am using several
foundation libraries for better code reuse. The libraries are intended to
work within the limits of the Compact framework so I can write a single
source for both applications.

I'm assuming you are aware of this but just want to make sure.. There is a
lot of functionality not supported in the CF that's on the full framework,
hence the name Compact Framework. The work done at www.opennetcf.org
bridges much of this gap and is nothing short of amazing and they deserve
sainthood. Nonetheless, you are going to have to either make sure that your
code doesn't try to reference anything that's not available or you'll have
to do some conditional compilation - the bottom line is that it's possible
but may end up being more work then maintaining two copies - really depends
on the scenario.
My problem is that I can't find a way to make 2 compilation libraries for
the Smart Device and the windows XP. I tried using 2 separate projects and
use the same files but the IDE copied the files in to the new project folder
instead of using the original files.
Is there a better way to do it?
Am I doing something wrong when "Adding an Existing Item" to the project?
This will copy the files uniquely so you may want to compile your own
library and add a reference to the other project.

There are a few threads on the subject, and I'm trying to find the other
ones for you. I know Lloyd Dupont has discussed this a bunch (he's in the
thread referenced below)

http://www.dotnet247.com/247reference/msgs/40/204256.aspx

HTH,

Bill

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
http://www.devbuzz.com/content/zinc_personal_media_center_pg1.asp
 
Thanks for the help. Looking at yours and Lloyd Dupont's notes, I found the solution I was looking for

Using a single smart device library (under the Compact Framework limitations), for both Win XP and WinCE when I want to use the same code
In the cases where different implementation is needed I decided to use two projects that reside under the same directory and share the same source files except for the platform specific code, which will be used only in it's dedicated project, thus enabling code reuse in a single source file

Daniel.
 
Back
Top