Multi-platform?

  • Thread starter Thread starter Jan Roelof de Pijper
  • Start date Start date
J

Jan Roelof de Pijper

Why is it that when I make a bare-bones C# program for the desktop PC I
cannot run it on my PocketPC? I thought that was what .NET is all about!

The bare-bones program just displays the simplest of WinForms and does NOT
use the designer. When I try to execute it on the PocketPC I get "A managed
MissingMethodException occurred at ?::?+0x0". When I use the exact same code
pasted into a "Smart Device Application" project there is no problem and I
can even use *that* exe file on the desktop PC ??!!

I hope someone can explain this to me ..
Thanks,
Jan Roelof


The code:

namespace CSharpSchool
{
class Test
{
static void Main()
{
Application.Run(new MyWindow());
}
}

class MyWindow : Form
{
public MyWindow() : base()
{
try
{
this.Text = "My First Windows Application";
this.Size = new Size(300, 300);

Label lblGreeting = new Label();
lblGreeting.Text = "Hello WinForm";
lblGreeting.Location = new Point(100, 100);

this.Controls.Add(lblGreeting);
}
catch( Exception e )
{
Console.WriteLine( e.ToString( ) );
}
}
}
}
 
Desktop apps are not retargetable to the CF, but CF apps are retargetable to
the desktop.
 
Thanks! It seems a pity, though, since I am not using anything that isn't
also present in the CF version. O well, I'll just have to live with it then.
I was kinda hoping to use VC++.NET for the PocketPC so that I can do all my
developing in the same language. I get the distinct impression that C++ is
being faded out as a developemnt language for the PocketPC platform. Or is
that just my paranoia?

Thanks,
Jan Roelof
 
C++ is very much still supported for Pocket PC for native code
development -using eVC 3.0 or 4.0. However for .NET Compact Framework only
VB.NET and C# are currently supported.

Peter
 
Back
Top