GAC - System.Data.dll - TypeLoadException problem

P

Pasan

Hi guys. I am having some problems with using ADO .NET DataTable class in my
program. Whenever I enter a function that has DataTable as a local variable,
it throws a TypeLoadException. When I copy System.Data.dll to the local
directory, everything works perfectly. I also verified that the /Windows
folder contains the correct GAC file
(GAC_System.Data_v1_0_5000_0_cneutral_1.dll). Does anyone know why it is not
picking up the correct dll from the GAC and forcing me to copy it locally?.

If anyone has any ideas, please let me know!.. I included some additional
comments below which might be helpful in better understanding the question.
My guess is, there is a problem in the way I am compiling my executable (but
not sure how). Thanks a bunch.

-Pasan

[Additional info]
-This program is part of a test stream, so everything is done command-line.
First the program is compiled using csc.exe and then copied to the emulator
using ActiveSync and then executed.
-The System.Data.dll file that was copied locally (which caused the program
to work) is the same as the .dll file used to construct the corresponding
GAC dll in the Windows folder - ie. both the local .dll and the GAC .dll is
the file found in the netcf.core.ppc3.x86.cab file.
-A sample application that was developed and deployed using the VS .NET 2003
IDE, WAS picking up the GAC's version of System.Data.dll (atleast I think
so, since I didn't have any other System.Data.dll's lying around when I ran
that application).
 
P

Pasan

Hi Neil. Thanks for the reply. The File Version of
GAC_System.Data_v1_0_5000_0_cneutral_1.dll file in the \Windows directory of
the emulator is 1.0.2268.0 [Public key token - 96 9d b8 05 3d 33 22 ac]. The
File Version of System.Data.dll in
(<VS>\CompactFrameworkSDK\v1.0.5000\Windows CE) is also1.0.2268.0 [Public
key token - 96 9d b8 05 3d 33 22 ac].

The manifest of my [executable] that I am compiling has the following:

..assembly extern System.Data
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
..z\V.4..
.ver 1:0:5000:0
}
..assembly extern retargetable System.Data as System.Data_4
{
.publickeytoken = (96 9D B8 05 3D 33 22 AC ) //
.....=3".
.ver 1:0:5000:0
}

I am not quite sure why there 2 items here. The last publickeytoken seems to
match the public key tokens of the 2 .dll files. Not really sure where the
other one is coming from (B7 ...).

Thanks again Neil.

-Pasan

Neil Cowburn said:
What is the File Version (not the assembly version as this is always
1.0.5000.0) you are building against on the command-line?

--
Neil Cowburn
Technologist
Microsoft Windows Embedded MVP
Content Master Ltd.

www.contentmaster.com | www.opennetcf.org


Pasan said:
Hi guys. I am having some problems with using ADO .NET DataTable class
in
my
program. Whenever I enter a function that has DataTable as a local variable,
it throws a TypeLoadException. When I copy System.Data.dll to the local
directory, everything works perfectly. I also verified that the /Windows
folder contains the correct GAC file
(GAC_System.Data_v1_0_5000_0_cneutral_1.dll). Does anyone know why it is not
picking up the correct dll from the GAC and forcing me to copy it locally?.

If anyone has any ideas, please let me know!.. I included some additional
comments below which might be helpful in better understanding the question.
My guess is, there is a problem in the way I am compiling my executable (but
not sure how). Thanks a bunch.

-Pasan

[Additional info]
-This program is part of a test stream, so everything is done command-line.
First the program is compiled using csc.exe and then copied to the emulator
using ActiveSync and then executed.
-The System.Data.dll file that was copied locally (which caused the program
to work) is the same as the .dll file used to construct the corresponding
GAC dll in the Windows folder - ie. both the local .dll and the GAC .dll is
the file found in the netcf.core.ppc3.x86.cab file.
-A sample application that was developed and deployed using the VS .NET 2003
IDE, WAS picking up the GAC's version of System.Data.dll (atleast I think
so, since I didn't have any other System.Data.dll's lying around when I ran
that application).
 

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