TypeLoadException

R

Rolf Kragh

After upgrading my target system with a new version of CE .NET I get the
following error when trying to run my application:

TypeLoadException
Could not load type
System.Data.DataSet from assembly
System.Data, Version 1.0.5000.0,
Culture=neutral

The application is a C# application using MS SQL desktop engine as database.
I found a directory named "1.0.5000" under the ...\Visual Studio .NET
2003\CompactFrameworkSDK\... directory. I have one theory that the problem
is caused by older files on the development system than on the target
system, but I have not been able to find any simple way of upgrading the
Visual Studio .NET CF files. Any help on this matter would be greatly
appreciated.

Regards,
Rolf Kragh
 
R

Rolf Kragh

The problem is not the application but that I have one CE .NET image buildt
with the latest patches which does not run my application and another older
CE image that runs the application without problems. Anyone that have
observed similar behaviour caused by using the quarterly QFE patches for PB
4.2? The application is the same and the target is the same.

Rolf
 
P

Paul G. Tobey [eMVP]

There was a bad QFE for CE 4.2 released a while back. If you built an OS
with that QFE in, no .NET CF applications would run. Without the QFE, they
were fine. Are you getting an exception when you try to run the program?
If so, what?

Paul T.
 
R

Rolf Kragh

Yes, your right - applications not using CF runs fine. The exception that I
get from an application using CF is:
Fatal Application Error - Application TestApp.exe has performed an illegal
operation and will be shut down ... Exception: 0xC0000005
Is there a later QFE that fixes this problem ? What do you recommend I
should do?

Rolf
 
R

Rolf Kragh

After installing the following patches for PB; Yearly 2003 QFE, Q1 2004 QFE
and Q2 2004 QFE and rebuiling a new image my CF application reports:

Unhandled exception of type 'System.TypeLoadException' occured in
TestApp.exe
Could not load type System.Data.DataSet from assembly System.Data,
Version=1.0.5000.0, Culture=neutral

When deploying this application from VS .NET 2003 to the target I get the
following warning:
Files in the package 'netcf.all.wce4.x86.cab' are more recent on the device
than on the development computer.

I have not found any updates for VS that upgrades the CompactFrameworkSDK
folder where this cab file resides. Is there a way of building or updating
the cab file? The file is from 2002.

Rolf
 
P

Paul G. Tobey [eMVP]

We've gone over the process of installing the service packs for the CF on
the PC a number of times, although I don't recall a step-by-step process for
doing it. The complaint about versioning is because, as a result of
updating the OS, you're now building .NET CF 1.0 SP2 into the device, but
you have some earlier version on the development machine. You might look
through the archives here for how to install SP2 onto the development
machine:

http://groups.google.com/groups?hl=...soft.public.dotnet.framework.compactframework

The type load error is probably caused because, although you are building
the .NET CF itself into the device, you probably have *not* elected to
include the SQL CE or SQL Server pieces (they show up as children of the
..NET CF itself in the PB catalog). I think that either installing SP2 on
the development machine or, better, including those pieces in the OS, will
fix that problem.

Paul T.
 
R

Rolf Kragh

Thanks for your help so far, but it has not solved the whole problem. I
have now the following questions:

1) I have installed all the QFEs for PB4.2 but in PB it still says CF 1.0 -
is there a way to know if I have successfully upgraded and what is included
in the generated image?
2) Which CF version and SP version is included in in the latest QFE (april -
june 2004)? Is it CF1.0 with SP2?
3) Is there a CF 1.1 for PB/CE4.2 since there is a .NET framework 1.1 for XP
on the desktop? There are little information as to relations between .NET
framework and CF versions! I have a client-server application (server using
..NET framework and client on a target using CF) - I assume that the
frameworks must correspond in some way?
4) You were right on the SQL server pieces - I have now added these in the
PB and generated a new image.
5) I also tried to run through upgrading the development machine with .NET
framework without that making any difference.

The status is now that the application using CF will not start on the new
CE4.2 target! I have also seen several other questions related to the same
problems after upgrading to SP2.

Rolf

Paul G. Tobey said:
We've gone over the process of installing the service packs for the CF on
the PC a number of times, although I don't recall a step-by-step process for
doing it. The complaint about versioning is because, as a result of
updating the OS, you're now building .NET CF 1.0 SP2 into the device, but
you have some earlier version on the development machine. You might look
through the archives here for how to install SP2 onto the development
machine:

http://groups.google.com/groups?hl=...soft.public.dotnet.framework.compactframework

The type load error is probably caused because, although you are building
the .NET CF itself into the device, you probably have *not* elected to
include the SQL CE or SQL Server pieces (they show up as children of the
.NET CF itself in the PB catalog). I think that either installing SP2 on
the development machine or, better, including those pieces in the OS, will
fix that problem.

Paul T.

Rolf Kragh said:
After installing the following patches for PB; Yearly 2003 QFE, Q1 2004
QFE
and Q2 2004 QFE and rebuiling a new image my CF application reports:

Unhandled exception of type 'System.TypeLoadException' occured in
TestApp.exe
Could not load type System.Data.DataSet from assembly System.Data,
Version=1.0.5000.0, Culture=neutral

When deploying this application from VS .NET 2003 to the target I get the
following warning:
Files in the package 'netcf.all.wce4.x86.cab' are more recent on the
device
than on the development computer.

I have not found any updates for VS that upgrades the CompactFrameworkSDK
folder where this cab file resides. Is there a way of building or updating
the cab file? The file is from 2002.

Rolf


Rolf Kragh said:
Yes, your right - applications not using CF runs fine. The exception
that I
get from an application using CF is:
Fatal Application Error - Application TestApp.exe has performed an
illegal
operation and will be shut down ... Exception: 0xC0000005
Is there a later QFE that fixes this problem ? What do you recommend I
should do?

Rolf

"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message There was a bad QFE for CE 4.2 released a while back. If you built
an
OS
with that QFE in, no .NET CF applications would run. Without the QFE,
they
were fine. Are you getting an exception when you try to run the program?
If so, what?

Paul T.

The problem is not the application but that I have one CE .NET image
buildt
with the latest patches which does not run my application and another
older
CE image that runs the application without problems. Anyone that have
observed similar behaviour caused by using the quarterly QFE
patches
for
PB
4.2? The application is the same and the target is the same.

Rolf

If your application is compiled as a desktop project it won't run on
the
device, it needs to be built against the Compact Framework as a
Smart
Device
project type.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows
Mobile
and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups

After upgrading my target system with a new version of CE .NET I get
the
following error when trying to run my application:

TypeLoadException
Could not load type
System.Data.DataSet from assembly
System.Data, Version 1.0.5000.0,
Culture=neutral

The application is a C# application using MS SQL desktop engine as
database.
I found a directory named "1.0.5000" under the ...\Visual Studio .NET
2003\CompactFrameworkSDK\... directory. I have one theory that the
problem
is caused by older files on the development system than on the target
system, but I have not been able to find any simple way of upgrading
the
Visual Studio .NET CF files. Any help on this matter would be greatly
appreciated.

Regards,
Rolf Kragh
 
P

Paul G. Tobey [eMVP]

1. No, not without actually running the device and checking the assembly
versions. You can search the newsgroup archives for detecting the presence
of SP2.

2. I don't recall which QFE it is, but the latest set will give you 1.0SP2
(that's the latest released version).

3. No, the version numbering for .NET CF has pretty much *nothing* to do
with the desktop versions. They are different libraries. No, the
frameworks don't have to correspond in some way. Your communication
protocol has to be the same.

5. That's no surprise. As I said, the .NET CF has as close to nothing as
you're ever likely to get to do with .NET framework.

Have the wizard in VS.NET generate a simple smart device application for
you. Does *that* start (add *no* code to it at all)?

Paul T.

Rolf Kragh said:
Thanks for your help so far, but it has not solved the whole problem. I
have now the following questions:

1) I have installed all the QFEs for PB4.2 but in PB it still says CF
1.0 -
is there a way to know if I have successfully upgraded and what is
included
in the generated image?
2) Which CF version and SP version is included in in the latest QFE
(april -
june 2004)? Is it CF1.0 with SP2?
3) Is there a CF 1.1 for PB/CE4.2 since there is a .NET framework 1.1 for
XP
on the desktop? There are little information as to relations between .NET
framework and CF versions! I have a client-server application (server
using
.NET framework and client on a target using CF) - I assume that the
frameworks must correspond in some way?
4) You were right on the SQL server pieces - I have now added these in the
PB and generated a new image.
5) I also tried to run through upgrading the development machine with .NET
framework without that making any difference.

The status is now that the application using CF will not start on the new
CE4.2 target! I have also seen several other questions related to the same
problems after upgrading to SP2.

Rolf

Paul G. Tobey said:
We've gone over the process of installing the service packs for the CF on
the PC a number of times, although I don't recall a step-by-step process for
doing it. The complaint about versioning is because, as a result of
updating the OS, you're now building .NET CF 1.0 SP2 into the device, but
you have some earlier version on the development machine. You might look
through the archives here for how to install SP2 onto the development
machine:

http://groups.google.com/groups?hl=...soft.public.dotnet.framework.compactframework

The type load error is probably caused because, although you are building
the .NET CF itself into the device, you probably have *not* elected to
include the SQL CE or SQL Server pieces (they show up as children of the
.NET CF itself in the PB catalog). I think that either installing SP2 on
the development machine or, better, including those pieces in the OS,
will
fix that problem.

Paul T.

Rolf Kragh said:
After installing the following patches for PB; Yearly 2003 QFE, Q1 2004
QFE
and Q2 2004 QFE and rebuiling a new image my CF application reports:

Unhandled exception of type 'System.TypeLoadException' occured in
TestApp.exe
Could not load type System.Data.DataSet from assembly System.Data,
Version=1.0.5000.0, Culture=neutral

When deploying this application from VS .NET 2003 to the target I get the
following warning:
Files in the package 'netcf.all.wce4.x86.cab' are more recent on the
device
than on the development computer.

I have not found any updates for VS that upgrades the CompactFrameworkSDK
folder where this cab file resides. Is there a way of building or updating
the cab file? The file is from 2002.

Rolf


Yes, your right - applications not using CF runs fine. The exception
that
I
get from an application using CF is:
Fatal Application Error - Application TestApp.exe has performed an
illegal
operation and will be shut down ... Exception: 0xC0000005
Is there a later QFE that fixes this problem ? What do you recommend I
should do?

Rolf

"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
wrote in message There was a bad QFE for CE 4.2 released a while back. If you built an
OS
with that QFE in, no .NET CF applications would run. Without the QFE,
they
were fine. Are you getting an exception when you try to run the
program?
If so, what?

Paul T.

The problem is not the application but that I have one CE .NET image
buildt
with the latest patches which does not run my application and another
older
CE image that runs the application without problems. Anyone that have
observed similar behaviour caused by using the quarterly QFE patches
for
PB
4.2? The application is the same and the target is the same.

Rolf

If your application is compiled as a desktop project it won't run on
the
device, it needs to be built against the Compact Framework as a
Smart
Device
project type.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile
and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups

After upgrading my target system with a new version of CE .NET
I
get
the
following error when trying to run my application:

TypeLoadException
Could not load type
System.Data.DataSet from assembly
System.Data, Version 1.0.5000.0,
Culture=neutral

The application is a C# application using MS SQL desktop engine as
database.
I found a directory named "1.0.5000" under the ...\Visual
Studio
.NET
2003\CompactFrameworkSDK\... directory. I have one theory
that
the
problem
is caused by older files on the development system than on the
target
system, but I have not been able to find any simple way of
upgrading
the
Visual Studio .NET CF files. Any help on this matter would be
greatly
appreciated.

Regards,
Rolf Kragh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top