System.MissingMethodException / couldn't find method: .ctor
I've developed a Smartdevice Application that creates an instance of an ClassLibary and the ClassLibary creates an instance of an SQLServerCE-Connection.
If I try to run the Project on my PocketPC I get the following error:
An unhandled exception of type 'System.MissingMethodException' occurred in DeviceApplication3.exe
Additional information: couldn't find method: .ctor ClassLibrary2.Class1.
My Code looks like this:
//Project DeviceApplication3
namespace DeviceApplication3
{
public partial class Form1 : Form
{
private ClassLibrary2.Class1 my = new ClassLibrary2.Class1();
public Form1()
{
InitializeComponent();
}
}
}
//Project ClassLibrary2
namespace ClassLibrary2
{
public partial class Class1
{
private System.Data.SqlServerCe.SqlCeConnection cn = new System.Data.SqlServerCe.SqlCeConnection();
public Class1()
{
}
}
}
What I've noticed is that every time I start the Project VS wants to deploy the SQLServer to the device:
Deploying 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\wce400\ARMV4\sqlce30.ppc.wce4.armv4.CAB'
Deploying 'C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\wce400\ARMV4\sqlce30.dev.enu.ppc.wce4.armv4.CAB'
I've tested this on the Emulator, Dell Axim X30 and T-Mobile MDA III.
I'm using Visual Studio 2005 Beta 2.
What's wrong?
Thanks in advance...
Markus

