I'm working on an add-in for Visual Studio which works well on framework 3.5 but not on 4.
Do you have any idea why would the add-in do this?
The add-in is written in C#.

The problem happens after I create:

System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SomeKindOfDialog)); private System.Windows.Forms.TableLayoutPanel MainTable;

When I try to do this:

resources.ApplyResources(this.MainTable, "MainTable");

The program crashes.

In the catch block i get BadImageFormatException.

What version of .net is your add-in built against? Also,check if there is an InnerException as that generally provides a little more insight to the problem.

What version of .net is your add-in built against? Also,check if there is an InnerException as that generally provides a little more insight to the problem.

Where to check for inner exception? Every line of the code?

It's not build against nothing. It doesn't work in 4.0. The platform is x86.