BadImageFormatException : Types Defined in a Referenced Assembly at Run-time

Error : BadImageFormatException occurs when trying to Instantiating Types Defined in a Referenced Assembly at Run-time.

Cause : Instantiating Types Defined in a Referenced Assembly at Run-time

Resolution : Rebuild the referenced assembly using the "AnyCPU" setting. This would allow the class contained in it to be instantiated within a 32-bit process, or in a 64-bit process.


Reference: http://msdn.microsoft.com/en-us/library/07bysfz2.aspx


Article by Gaurav Aroraa
Gaurav is a Microsoft Technology Specialist professional. He has awarded lifetime membership from Computer Society of India (CSI). He has more than 13yrs of experience in the industry. Currently, he is working in the capacity of Solution Architect with an MNC. He is serving to the various communities since 1999.

Follow Gaurav Aroraa or read 149 articles authored by Gaurav Aroraa

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: