Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted
InvalidProgramException

 

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.

[/Quote]

As the text says, this could be due to a compiler bug. I believe that this exception also occurs when unverifiable code is encountered. This can also happen when you use certain features such as unsafe code (C#). Since the designer still works, this is most likely not a problem occuring in designer generated code. Unfortunately, with an error message so vague good help is hard to provide.

 

One other suggestion that might hint at the nature of the issue is to change your .Net runtime configuration (I'm not sure how, but it can be found in MSDN) to run unverifiable code and see if it resolves this issue. If so, then the code you are using (or a bug in the compiler) is producing unverifiable code.

 

There is an MSDN article that discusses this exception.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...