错误:Typeninitialisierer帽子eine Ausnahme verursacht(类型初始值设定项引发异常) [英] Error: Typeninitialisierer hat eine Ausnahme verursacht (Type initializer threw an exception)

查看:66
本文介绍了错误:Typeninitialisierer帽子eine Ausnahme verursacht(类型初始值设定项引发异常)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经用VB 2005(XP)编写了一个应用程序.现在,我们想升级到Vista和VB 2008 + Framework 3.5,但是在测试我们的应用程序时,调试器显示以下异常:

Hi,

I have written an application in VB 2005 (XP).. Now we want to upgrade to Vista and VB 2008 + Framework 3.5, but while testing our applications the Debugger shows following exception:

An unhandled exception of type 'System.InvalidOperationException' occurred in App.exe
Additional information: Fehler beim Erstellen des Formulars. Weitere Informationen finden Sie in Exception.InnerException. Fehler: Der Typeninitialisierer für "App.ModuleMain" hat eine Ausnahme verursacht..

除了按钮"Break"以外,和继续"没有更多信息可查看(没有InnerException!)

仅在Debug-Output窗口中显示消息,一次又一次加载dll文件,但每次都将其卸载:

Apart from the buttons "Break" and "Continue" there is no more information to view (NO InnerException!)

Only in the Debug-Output window shows messages that a dll-file is loaded again and again, but unloaded each time:

'App.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.8' 2.6001.18000_none_886786f450a74a05\comctl32.dll'
'App.exe': Unloaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.8' 2.6001.18000_none_886786f450a74a05\comctl32.dll'

就是这样...

我已经检查了解决方案中的所有路径和文件名,没有发现问题.

该解决方案包含4个项目:1个应用程序和3个包含在该应用程序中的类库.应用程序以Splash形式开始

That's it...

I've checked all paths and filenames in the solution and found no issue.

The solution contains 4 projects: 1 app and 3 class libraries which are included by the app. The applications starts with a Splash form

推荐答案

抱歉,我的英语不好,也很迟才回答.

sorry for my bad englisch and for this late answer.

当您遇到此异常时,则您的静态类具有无法找到或处于活动状态的源文件或组件,因此无法创建这些属性或成员.

When you get this exception, then your static class have properties or members, that can't create because a source file or a component was not found or active.

祝你玩得开心.


这篇关于错误:Typeninitialisierer帽子eine Ausnahme verursacht(类型初始值设定项引发异常)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆