''的类型初始值设定项引发了异常。 [英] The type initializer for '' threw an exception.

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

问题描述

我有一个源代码,在单个解决方案中有25个项目。它由c ++和C#项目组成。但是现在我想从一个单独的测试项目调用一个C#项目(它是windows应用程序类型)调用。我创建了一个单独的c#项目并添加了源代码引用,并创建了一个源代码类对象。它建设很好。但在执行时,它正在抛出'抛出异常'的类型初始化程序异常。请给我建议解决这个问题。



提前谢谢

I had one source code having 25 projects in single solution. It is consisting of both c++ as well as C# project. But now i wanted to call one of C# project(which is of windows application type) calls from a separate test project. I created a separate c# project and added the source reference, and created a object of source code class. it is building fine. but at the time of execution, it is throwing "The type initializer for '' threw an exception" exception. Please give me suggestion to resolve this issue.

Thanks in advance

推荐答案

你第一次看透了吗这里 - ''抛出异常的类型初始化程序 [ ^ ]?
Did you first look through here - The type initializer for '' threw an exception[^]?


试试这个



''抛出异常的类型初始值设定项 [ ^ ]


这篇关于''的类型初始值设定项引发了异常。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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