All Forums
 Microsoft Windows CE
 .NET Application Development
 typeloadexception
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

tlendway

4 Posts

Posted - 30 Jul 2009 :  08:37:40  Show Profile
I seem to have accidentally messed up my development environment?!?! Yesterday I was trying to get the debugger working, and installed .net CF SP1 and SP2, now I can build and deploy to Bitsy with no errors but I get a TypeLoadException (without any other data, even when I click "Details") right after I launch the app, even before it can output any data to the debug port (COM3).

I've tried changing to a different BitsyXb board, same result. I've tried going back to an older known-good version of my source code, same result. I understand this error means something is getting built in that shouldn't be there (like a non-cf library call), but how do I determine where the problem is? My build settings have not changed, still targeting Win CE 5.0. How is it that such a fundamental error can get past the compiler? Shouldn't it know that it's building something that's not supported on the target platform?

tlendway

4 Posts

Posted - 30 Jul 2009 :  09:08:24  Show Profile
Tried using the debugger on this, sometimes it gets an error trying to open a com port connection, saying COM1 doesn't exist. Most of the time, it gets an error trying to open a SqlCeConnection. All of this code was working before I tried to install .net CF SP2. I wonder if I need a patch update to SqlServerCe?
Go to Top of Page

ctacke

877 Posts

Posted - 30 Jul 2009 :  11:06:31  Show Profile  Email Poster
What Type is failing to load?
Go to Top of Page

tlendway

4 Posts

Posted - 30 Jul 2009 :  11:33:42  Show Profile
I've now turned on loader logging, got this:
========================================
Process [\Program Files\chf.aquadex.bitsy\CHF.Aquadex.Bitsy.exe]
ProcessID [0x42a6d91e]
Date [2009/07/30] (yyyy/mm/dd)
Time [14:53:01] (hh:mm:ss)
NETCF [2.0.7045.00]
Platform [Windows CE v5.0.0 (PLATFORM_TYPE) WinCE5ARMV4I release V2\SP2 ARMV4I IJITv2]
========================================
GAC: Updating GAC [0x0]
GAC: Checking .gac files inside [\Windows\]
GAC: Found [System.SR.2.0.ENU.gac] .gac file.
GAC: Found [Microsoft .NET CF 2.0.GAC] .gac file.
GAC: Done with the file system check. Checking the registry.
GAC: Found [System.SR.2.0.ENU.gac] registry entry.
GAC: Found [Microsoft .NET CF 2.0.GAC] registry entry.
GAC: Done with the registry check. Let's compare.
GAC: Entry [Microsoft .NET CF 2.0.GAC] is up to date.
GAC: Entry [System.SR.2.0.ENU.gac] is up to date.
GAC: GAC is up to date.
Compatibility mode [2.0.0.0]
Loading module [\Windows\GAC_mscorlib_v2_0_0_0_cneutral_1.dll]
Loaded [mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_mscorlib_v2_0_0_0_cneutral_1.dll]
Loading module [\Program Files\chf.aquadex.bitsy\CHF.Aquadex.Bitsy.exe]
Policy file not present. [\Program Files\chf.aquadex.bitsy\CHF.Aquadex.Bitsy.exe.config]
Loading module [\Windows\GAC_System.Windows.Forms_v2_0_0_0_cneutral_1.dll]
Loaded [System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_System.Windows.Forms_v2_0_0_0_cneutral_1.dll]
Loading module [\Windows\GAC_System_v2_0_0_0_cneutral_1.dll]
Loaded [System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_System_v2_0_0_0_cneutral_1.dll]
Loading module [\Windows\GAC_System.Drawing_v2_0_0_0_cneutral_1.dll]
Loaded [System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_System.Drawing_v2_0_0_0_cneutral_1.dll]
Loading module [\Program Files\chf.aquadex.bitsy\MwTrend.dll]
Failed to load [MwTrend, Version=2.0.1.0, Culture=neutral, PublicKeyToken=66396285E6791B19] from GAC
Loaded [MwTrend, Version=2.0.1.0, Culture=neutral, PublicKeyToken=66396285E6791B19] from [\Program Files\chf.aquadex.bitsy\MwTrend.dll]
Loading module [\Program Files\chf.aquadex.bitsy\OpenNETCF.Net.dll]
Failed to load [OpenNETCF.Net, Version=2.1.0.0, Culture=neutral, PublicKeyToken=E60DBEA84BB431B7] from GAC
Loaded [OpenNETCF.Net, Version=2.1.0.0, Culture=neutral, PublicKeyToken=E60DBEA84BB431B7] from [\Program Files\chf.aquadex.bitsy\OpenNETCF.Net.dll]
Loading module [\Program Files\chf.aquadex.bitsy\OpenNETCF.WindowsCE.Messaging.dll]
Failed to load [OpenNETCF.WindowsCE.Messaging, Version=2.1.0.0, Culture=neutral, PublicKeyToken=E60DBEA84BB431B7] from GAC
Loaded [OpenNETCF.WindowsCE.Messaging, Version=2.1.0.0, Culture=neutral, PublicKeyToken=E60DBEA84BB431B7] from [\Program Files\chf.aquadex.bitsy\OpenNETCF.WindowsCE.Messaging.dll]
Loading module [\Windows\GAC_System.Data_v2_0_0_0_cneutral_1.dll]
Loaded [System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_System.Data_v2_0_0_0_cneutral_1.dll]
Loading module [\Windows\GAC_System.Xml_v2_0_0_0_cneutral_1.dll]
Loaded [System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_System.Xml_v2_0_0_0_cneutral_1.dll]
Loading module [\Windows\GAC_System.Windows.Forms.DataGrid_v2_0_0_0_cneutral_1.dll]
Loaded [System.Windows.Forms.DataGrid, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_System.Windows.Forms.DataGrid_v2_0_0_0_cneutral_1.dll]
Loading module [\Program Files\chf.aquadex.bitsy\OpenNETCF.Windows.Forms.dll]
Failed to load [OpenNETCF.Windows.Forms, Version=2.1.0.0, Culture=neutral, PublicKeyToken=E60DBEA84BB431B7] from GAC
Loaded [OpenNETCF.Windows.Forms, Version=2.1.0.0, Culture=neutral, PublicKeyToken=E60DBEA84BB431B7] from [\Program Files\chf.aquadex.bitsy\OpenNETCF.Windows.Forms.dll]
Loading module [\Program Files\chf.aquadex.bitsy\OpenNETCF.WindowsCE.Media.dll]
Failed to load [OpenNETCF.WindowsCE.Media, Version=1.0.2801.0, Culture=neutral, PublicKeyToken=AE789DCA12CACB04] from GAC
Loaded [OpenNETCF.WindowsCE.Media, Version=1.0.2801.0, Culture=neutral, PublicKeyToken=AE789DCA12CACB04] from [\Program Files\chf.aquadex.bitsy\OpenNETCF.WindowsCE.Media.dll]
Loading module [\Program Files\chf.aquadex.bitsy\ctlPsdaLib.dll]
Failed to load [ctlPsdaLib, Version=1.0.3498.14278, Culture=neutral, PublicKeyToken=null] from GAC
Loaded [ctlPsdaLib, Version=1.0.3498.14278, Culture=neutral, PublicKeyToken=null] from [\Program Files\chf.aquadex.bitsy\ctlPsdaLib.dll]
Loading module [\Windows\GAC_System.SR_v2_0_0_0_cneutral_1.dll]
Loaded [System.SR, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC] from [\Windows\GAC_System.SR_v2_0_0_0_cneutral_1.dll]
Loading module [\Program Files\chf.aquadex.bitsy\en-US\System.SR.resources.dll]
Attempt to load [\Program Files\chf.aquadex.bitsy\en-US\System.SR.resources.dll] has failed (err 0x80001001).
Loading module [\Program Files\chf.aquadex.bitsy\en-US\System.SR.resources.exe]
Attempt to load [\Program Files\chf.aquadex.bitsy\en-US\System.SR.resources.exe] has failed (err 0x80001001).
Loading module [\Windows\en-US\System.SR.resources.dll]
Attempt to load [\Windows\en-US\System.SR.resources.dll] has failed (err 0x80001001).
Loading module [\Windows\en-US\System.SR.resources.exe]
Attempt to load [\Windows\en-US\System.SR.resources.exe] has failed (err 0x80001001).
Failed to load [System.SR.resources, Version=2.0.0.0, Culture=en-US, PublicKeyToken=969DB8053D3322AC]
Loading module [\Program Files\chf.aquadex.bitsy\en\System.SR.resources.dll]
Attempt to load [\Program Files\chf.aquadex.bitsy\en\System.SR.resources.dll] has failed (err 0x80001001).
Loading module [\Program Files\chf.aquadex.bitsy\en\System.SR.resources.exe]
Attempt to load [\Program Files\chf.aquadex.bitsy\en\System.SR.resources.exe] has failed (err 0x80001001).
Loading module [\Windows\en\System.SR.resources.dll]
Attempt to load [\Windows\en\System.SR.resources.dll] has failed (err 0x80001001).
Loading module [\Windows\en\System.SR.resources.exe]
Attempt to load [\Windows\en\System.SR.resources.exe] has failed (err 0x80001001).
Failed to load [System.SR.resources, Version=2.0.0.0, Culture=en, PublicKeyToken=969DB8053D3322AC]
==================(end)=================

Note sure what System.SR.resources is or how I lost it?
Go to Top of Page

ctacke

877 Posts

Posted - 30 Jul 2009 :  12:24:42  Show Profile  Email Poster
System.SR.resources is simply a resource assembly that contains all of the localized strings for exceptions, so you can get useful data back. It's on your dev PC here:

C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\Diagnostics\NETCFv35.Messages.EN.cab
Go to Top of Page

tlendway

4 Posts

Posted - 30 Jul 2009 :  14:59:11  Show Profile
After working on this problem for 12 hours now, I finally have my app working again, fixed it by uninstalling .NET CF SP2 and reinstalling the original .NET (netcfsetupv2.msi, file date 9/23/05) that I believe came with Studio 2005 (which I still use).
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.05 seconds. Snitz Forums 2000