Common Language Runtime detected an invalid program?

前端 未结 2 2077
抹茶落季
抹茶落季 2020-12-21 05:47

I have this error repeating continuously in my program.

I have tried the following:

  1. Restart Visual Studio
  2. Clean and Rebuild Solution
相关标签:
2条回答
  • MSDN - InvalidProgramException

    Excerpt:

    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.

    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.

    0 讨论(0)
  • 2020-12-21 06:17

    Try following-

    1) Delete temporary asp.net files from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
    2) Recompile the assemblies and update the corresponding referenses

    0 讨论(0)
提交回复
热议问题