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( ) );
}
}
}
}
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( ) );
}
}
}
}