当我无权访问源代码时,如何修复System.TypeInitializationException错误? [英] How do I fix a System.TypeInitializationException error when I don't have access to the source code?

查看:92
本文介绍了当我无权访问源代码时,如何修复System.TypeInitializationException错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了一个由我们的开发人员编译的软件应用程序,但是很成功。但是,当我启动应用程序时,它崩溃了。查看崩溃日志文件,我注意到错误被隔离到:



132821 [错误] [AppName]:System.TypeInitializationException:'[ObjectName]的类型初始值设定项]'抛出一个例外。 ---> System.NullReferenceException:对象引用未设置为对象的实例。



为什么会发生这种情况?开发人员发誓它在他们的PC上成功运行,但那是因为他们有一个开发环境而我没有。



我运行了一个名为Dependency Walker的工具,显示了几个不在我系统上的dll。



您能否告诉我如何解决丢失的dll问题和/或System.TypeInitializationException消息?



谢谢。



V / R,

John

I installed a software application compiled by our developers, which was successful. However, when I launched the application, it crashed. Looking at the crash log file, I noticed the error was isolated to:

132821 [Error] [AppName]: System.TypeInitializationException: The type initializer for '[ObjectName]' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Why did this happen? The developers swear that it worked successfully on their PCs, but that's because they have a development environment and I don't.

I ran a tool called Dependency Walker, which showed several dlls that were not on my system.

Could you please advise as to how I can resolve the missing dll issue and/or the System.TypeInitializationException message?

Thanks.

V/R,
John

推荐答案

感谢Wes的快速回复。顺便说一下,当我收到您的回复时,其中一位开发人员设法在应用程序安装程序包中修复了该问题。显然,根据其中一位开发人员的说法,安装程序中包含了一个不必要的(并且格式错误的)xml文件副本。如果该文件已被删除,则此问题永远不会发生。



但我现在的应用程序运行正常。再次感谢。





V / R,

John
Thanks Wes for your prompt response. Incidentally, as I received your response, one of the developers managed to fix the issue within the application installer package. Apparently there was an unnecessary (and malformed) copy of an xml file included in the installer according to one of the developers. If that file had been removed, this issue would never have happened.

But I got the application working fine now. Thanks again.


V/R,
John


这篇关于当我无权访问源代码时,如何修复System.TypeInitializationException错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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