Cloning project from CF to regular .NET

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

Guest

Is there an easy way to dup a project via changing switches in a project/solution file? I have an app that runs under CF .NET, but, in case the Pocket PC is broken, users will need to enter data via PC. I'd like to use the CF app code, and just rebuild it for PC settings, so I do not have to clone all of the source files. I was able to gen a new project, targeting Windows Forms and add existing files, but this project cloned all source files and now I'd be stuck with having to maintain 2 sets of source files. I'd rather have 2 different project/solution files in the same directory... is there another way to do this that does not require file duplication?
 
If you want to share a source file between projects, goto "Add Existing
Item..." (Which you already did, obviously)

Look closely at the "Open" button. It has a drop down indicator to the
right of the control. Hit the drop down and two or three options will
appear:

Open
Open With
Link File

(This doesn't answer your core question, but I had problems sharing source
between projects until someone said, Look Closely, its the old drop down
command button control!)

Good Luck,

- K.


Garrick said:
Is there an easy way to dup a project via changing switches in a
project/solution file? I have an app that runs under CF .NET, but, in case
the Pocket PC is broken, users will need to enter data via PC. I'd like to
use the CF app code, and just rebuild it for PC settings, so I do not have
to clone all of the source files. I was able to gen a new project, targeting
Windows Forms and add existing files, but this project cloned all source
files and now I'd be stuck with having to maintain 2 sets of source files.
I'd rather have 2 different project/solution files in the same directory...
is there another way to do this that does not require file duplication?
 
The CF app should run on the PC without recompiling if you didn't use any
CE-specific items. As for the file's getting duplicated, in the file
settings, uncheck "copy local"

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Garrick said:
Is there an easy way to dup a project via changing switches in a
project/solution file? I have an app that runs under CF .NET, but, in case
the Pocket PC is broken, users will need to enter data via PC. I'd like to
use the CF app code, and just rebuild it for PC settings, so I do not have
to clone all of the source files. I was able to gen a new project, targeting
Windows Forms and add existing files, but this project cloned all source
files and now I'd be stuck with having to maintain 2 sets of source files.
I'd rather have 2 different project/solution files in the same directory...
is there another way to do this that does not require file duplication?
 
Thanks, If no one has a better way, I will do this. Of course it will require me to do something that I should have done to begin with - put data/validation and gui in different source files so I can share all but the GUI file. Did not feel the need to do this since it was such as simple little small project, until the PC entry requirement came along...
 
Wow, that's pretty cool. I didn't know CF apps would run on regular
Windows. But I'm using System.Data.SqlServerCe so those calls fail on my
PC. Is there a way to install SqlServerCe on a PC?
 
what keeps you from just running the exe on the PC ? (off course it doesn't
look all that good, but ...)
Garrick said:
Thanks, If no one has a better way, I will do this. Of course it will
require me to do something that I should have done to begin with - put
data/validation and gui in different source files so I can share all but the
GUI file. Did not feel the need to do this since it was such as simple
little small project, until the PC entry requirement came along...
 
Nope. You can, however, query the current platform, so you can write a data
access class that abstracts the SQL/SQLCE stuff away, then use the class
from your app, and it won't care where it's running. Ah the beauty of
polymorphism.

-Chris
 
Thanks for the info. I simply did not think that I can run CF apps on PC. Silly me, too used to cross compiling for different platforms, but .NET is not a native system, so it should work. I am using a couple of CE specific things, but I'l follow your advise and query the host type and take appropriate action

Thank
 
I was not even aware that I can do that. Silly me. But it will not run because I am using a couple of CF only things (e.g. Symbol Barcode scanner), but (see other replies) I should be able to query the platform and use PC verses CF equivalents. As far as not looking good, it is really not a concern - the users are (will be) accostomed to the Pocket PC interface, it looks good enough and the input mode is only a backup when they cannot use the Pocket PC because it is broken, stolen, etc.
 
My PPC app has blue buttons with yellow text. When I run it on my PC, the
buttons are yellow with black text. Sup with that?
 
Back
Top