通用语言运行时检测到一个无效的程序? [英] Common Language Runtime detected an invalid program?

查看:147
本文介绍了通用语言运行时检测到一个无效的程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的错误在我的程序不断重复。

I have this error repeating continuously in my program.

我已经试过如下:

  1. 在重新启动Visual Studio
  2. 清洁并重新生成解决方案

当我通过线code线步骤,它停止让我完全糊涂了,在一个方法调用:

When I step through the code line by line, it stops leaving me totally confused at a method call:

GenerateWorksheetPart1Content(WorksheetPart worksheetPart1)

我不明白为什么它停在那里。该参数不是在点零。这可能是导致该错误?

I don't understand why it stops there. The parameter is not null at the point. What could be causing the error?

推荐答案

MSDN - InvalidProgramException

节选:

当程序包含无效微软所引发的异常 中间语言(MSIL)或元数据。一般来说,这表明 在生成程序的编译器中的错误。

The exception that is thrown when a program contains invalid Microsoft intermediate language (MSIL) or metadata. Generally this indicates a bug in the compiler that generated the program.

这是发生当你在code的一步,因为作为你的方法被调用它正被JIT编译。如果编译由JITer是无效的,这异常会在这一点上被抛出。

This is happening as you step through the code because as your method is called it is being JIT compiled. If the compilation by the JITer is invalid, this exception will be thrown at this point.

这篇关于通用语言运行时检测到一个无效的程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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