Running cf programs on desktop

B

Beorne

2 different but similar problems with C# cf projects:

1) I can't run my cf application on my WinXp desktop PC. Double
clicking on the exe happens nothing. I does not know how to find the
error: I can debug my solution on the winCe device or on a simulator,
but I can't find how to change the debug target to Xp.

2) I have a desktop application using some cf libraries (this because
it shares some code with a cf application). It does run ok on my
desktop PC with winXp and VisualStudio but it does not run on any
other WinXP PC. In these PC is installed .NET 2.0 and .NET cf 2.0 (to
be sure) but the application just does nothing.

I have no idea hove to correct and debug these two errors,
Thank you very much
 
J

Jeff Hopper

You can't run a smart device/Windows Mobile application on a desktop/Windows
XP machine, just like you can't run a desktop application on a device. Since
the applications are compiled for different processors/platforms, you have
to use a device emulator to debug on the desktop. It is possible to share
certain code between Visual Studio projects, but a separate project for each
platform is needed to compile for each platform.
 
P

Paul G. Tobey [eMVP]

Take a look at Daniel Moth's article in this month's MSDN magazine. In
fact, you *can* run .NET CF programs on the desktop, as long as they aren't
using assemblies that don't exist on the desktop (SMS, etc., maybe).

The first step in figuring out why *this particular* program won't run is to
build a very simple, Hello, World .NET CF program and try running that on
the desktop. If that doesn't work, I'd guess that you don't have the .NET
Framework installed on the desktop machine. You can get that via Windows
Update or from the Microsoft downloads site, I'm sure.

If the Hello, World program does run, you'll need to figure out what's
different between your real program and that simple test. Any of the
Windows Mobile assemblies that you might be using could prevent it from
starting. If you need them and can't figure out how to work around, use the
emulator.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top