Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.TypeInitializationException

Status
Not open for further replies.

Kavius

Programmer
Apr 11, 2002
322
0
0
CA
Not specifically C#, more of a .NET app configuration problem.

I am trying to run an Executable, and keep receiving an unhandled "System.TypeInitializationException" exception:
[tt]
[2010-09-03 13:25:11,622][ERROR] Exception in Main:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Collections.Generic.List`1 ---> System.TypeLoadException: Could not load type 'White.Core.UIItems.WindowItems.Window[]' from assembly 'White.Core, Version=0.2.0.0, Culture=neutral, PublicKeyToken=2672efbf3e161801'.
at System.Collections.Generic.List`1[White.Core.UIItems.WindowItems.Window]..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Recorder.Domain.WhiteRecorder..ctor () [0x00000] in <filename unknown>:0
at Recorder.Controllers.DashboardController..ctor () [0x00000] in <filename unknown>:0
at Recorder.Program.Main () [0x00000] in <filename unknown>:0
[/tt]
Best I can tell, this is a missing DLL exception (White.Core.dll), but I have the executable in the same folder as all of the DLLs. I'm a little stumped as to how to approach this problem.

FYI: I'm running mono-2.6.7
 
it appears the white.core assembly is signed (PublicKeyToken=2672efbf3e161801). could it be the assembly in the directory is not the same assembly the code is looking for?

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
You had me hoping it was that simple (me missing the obvious), but...
[tt]
Assembly: White.Core, Version=0.2.0.0, Culture=neutral, PublicKeyToken=2672efbf3e161801
[/tt]
I just installed and uninstalled from the GAC.

Just to make sure I'm comparing correctly
[tt]
GAC: 2672efbf3e161801
Msg: 2672efbf3e161801
[/tt]
 
Try to check what's happening in the static constructor of the type White.Core.UIItems.WindowItems.Window.

On the ..cctor constructor of List<T>, it's merely creating an empty array of the type <T>.

hope this helps.
 
Thanks for the help. Unfortunately, no dice.

I was able to get this working on my home machine over the weekend. Something is obviously wonky on my work config.

My work config is a little bit of a hack. I don't have permission to install .NET, needed something to put together a test framework, and built most of Mono from scratch. Project White (on the other hand) is developed on the MS platform with Mono support not actually being an immediate goal. Between those two problems, I suppose I am pushing my luck.

Again... thanks.
 
try asking on the mono forums. starting with the devs/community is usually the best place to start.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top