E
Erik J Sawyer
I apologize if this has already been addressed; I looked,
but couldn't find it.
My VS solution contains 3 projects: a class library
(containg the app core logic), and both a Windows and a
PocketPC front-end. The class library contains an
abstract database operations class, then each front-end
app creates derived classes that connect to the
appropriate DB (either SQL or SQL CE).
What I'm running into is that the CF gets upset using a
base class, in a class library, that references a type
not already in memory. For example, if my app starts,
and creates an instance of the SQLCE derived class, and
the base class has a member variable of type
System.Data.IDbConnection, I get a TypeLoadException. I
can work around this by having my app create a variable
of a type from the assembly involved.
Note:
- the base class assembly DOES have a reference to the
System.Data assembly
- this problem does not happen on Windows with the
full .Net
- this is not restricted to System.Data. I have also
reproduced the behavior with System.Diagnostics
- although the Knowledgebase indicates that SP1 fixes
something similar, it does NOT fix this issue
If someone can help, PLEASE!
Thanks,
Erik J Sawyer
but couldn't find it.
My VS solution contains 3 projects: a class library
(containg the app core logic), and both a Windows and a
PocketPC front-end. The class library contains an
abstract database operations class, then each front-end
app creates derived classes that connect to the
appropriate DB (either SQL or SQL CE).
What I'm running into is that the CF gets upset using a
base class, in a class library, that references a type
not already in memory. For example, if my app starts,
and creates an instance of the SQLCE derived class, and
the base class has a member variable of type
System.Data.IDbConnection, I get a TypeLoadException. I
can work around this by having my app create a variable
of a type from the assembly involved.
Note:
- the base class assembly DOES have a reference to the
System.Data assembly
- this problem does not happen on Windows with the
full .Net
- this is not restricted to System.Data. I have also
reproduced the behavior with System.Diagnostics
- although the Knowledgebase indicates that SP1 fixes
something similar, it does NOT fix this issue
If someone can help, PLEASE!
Thanks,
Erik J Sawyer