I'm having this System.TypeInit ializerExceptio n problem but only during runtime in a separate environment than its own build environment.
Win7x64 is the build environment. I'm testing the project on various WinXPx86 computers using a Setup Deployment and am noticing the error.
The portion of the code that comes to question is:
I've tried and tested this suggested solution:
http://blog.wouldbethe ologian.com/2009/03/type-initializer-for-someclass-threw.html
Still no luck.
I have since installed MVS2008 (same as dev environment) on the XP machine and ran debugger. The error does not come up. I've built the Setup/Deployment and sent it to Win7, WinVista machines and they work fine. Any suggestions are greatly appreciated.
Win7x64 is the build environment. I'm testing the project on various WinXPx86 computers using a Setup Deployment and am noticing the error.
The portion of the code that comes to question is:
Code:
public static SettingsSingleton Instance { get { return Nested.instance; } }
...
class Nested
{
Nested() { }
static readonly SettingsSingleton instance = new SettingsSingleton();
}
http://blog.wouldbethe ologian.com/2009/03/type-initializer-for-someclass-threw.html
Still no luck.
I have since installed MVS2008 (same as dev environment) on the XP machine and ran debugger. The error does not come up. I've built the Setup/Deployment and sent it to Win7, WinVista machines and they work fine. Any suggestions are greatly appreciated.
Comment