run cf app on regular pc ?

  • Thread starter Thread starter Rainer Queck
  • Start date Start date
R

Rainer Queck

Hi NG,

what must I do to run a CF2.0 application on a standard windows xp pc?
Isn't it enought to have the compact framework installed on it?

My application runs fine on a pocketPC, but if I want to start it on my
workstation, nothing happens.

Thanks for hints and help.

Rainer
 
As long as you have limited your application to types and members that exist
in both the full framework and compact framework, and you have compiled the
application against the compact framework, then your application should get
retargeted to the full framework on the desktop when it's run. You do not
need the compact framework installed on the desktop to do this. However, I'd
assume that you'd need the full .NET framework 2.0 installed on the desktop
if your application was compiled against compact framework 2.0... but that's
just an assumption... you may be able to get away with the full .NET
framework 1.1 installed.
 
Hi Tim,
As long as you have limited your application to types and members that exist
in both the full framework and compact framework, and you have compiled the
application against the compact framework, then your application should get
retargeted to the full framework on the desktop when it's run. You do not
need the compact framework installed on the desktop to do this. However, I'd
assume that you'd need the full .NET framework 2.0 installed on the desktop
if your application was compiled against compact framework 2.0... but that's
just an assumption... you may be able to get away with the full .NET
framework 1.1 installed.
This is what I thought.
Since I have Visual Studio 2005 Installed, and developed the PockePC app
with it on my workstation, I would expect, that i can runn it there.
But as stated before, as soon as I "double click" on it, nothing
happens. No error message, nothing. Also the task manager does not show
this app running.

Regards
Rainer
 
Have you tried creating a very basic PPC application and running that on the
desktop? In other words, just create a new device project, compile it, and
then go to the output directory and run the exe. If it works then it may
indicate that there's something in your application that's causing it to
terminate when run on the desktop.
 
Hi Tim

Have you tried creating a very basic PPC application and running that on the
desktop? In other words, just create a new device project, compile it, and
then go to the output directory and run the exe. If it works then it may
indicate that there's something in your application that's causing it to
terminate when run on the desktop.
Just tried that. And yes you are right. the "other" PocketPC applictaion
works fine on my workstation.
I guess I will no have to search for what the reason to my problem could
be in my project.... hm...

Thanks for your hints. At least I now know where to search for the problem.

Rainer
 
Hi Daniel,
Can you post your code? If not let us know (or me directly if you prefer)
what the problem was. You should have at least got an exception if you were
using CF-specific functionality (either inherent or your own e.g. coredll
pinvokes).
I am still looking for the reason.
As it looks for the moment it must be some "visual component" out of the
tool box.

in the main forms constructor I placed some debugging code:

MessageBox.Show("OekoTempPPC 1");
InitializeComponent();
MessageBox.Show("OekoTempPPC 2");

"OekoTempPPC 1" message box is shown, the second one not.
I will continue this procedure inside "InitializeComponent()" to find
out which component it is....

Regards
Rainer
 
hm.... strange.

as stated before, I added some code to the "InitializeComponend" like:

private void InitializeComponent()
{
System.Windows.Forms.MessageBox.Show("InitializeComponent 1");
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(OekoTempPPC));
....

But this messagebox doesn't even pop up any more! Why?

Regards
Rainer
 
If you post a sample I can look at it. Of course, you verified that you are
not using anything CF-specific in the project, right?

Cheers
Daniel
 
Hi Daniel,
not using anything CF-specific in the project, right?
Thanks for this hint! I now know why I can't start my PocketPC app on a
regular PC. The problem was caused by the usage of the "InputPanel".

Regards
Rainer
 
Strange why you didn't get an exception though!

As a general rule on CF (as CF does not support the
AppDomain.UnhandledException exception) I wrap the main Application.Run
statement in a try catch block. This way I will always be able to catch any
unhandled exceptions.
 
Hi Simon,

Strange why you didn't get an exception though!
I have no idea. I do get an exception, if I start this app on a other
(not my dev station) PC.
As a general rule on CF (as CF does not support the
AppDomain.UnhandledException exception) I wrap the main Application.Run
statement in a try catch block. This way I will always be able to catch any
unhandled exceptions.
Thanks for this hint.

Rainer
 
Back
Top