Open
Description
This one is pretty straightforward, it seems as though placing generic type constraints on methods, where the type exists in a different assembly, causes the original to throw a BadImageFormatException
on load.
For example:
OtherLibrary.dll
public interface ISomeType
{
int Bar { get; set; }
}
ClientResource.net.dll
class Foo
{
public void Method<T>() where T : OtherLibrary.ISomeType {}
}
The above will throw the BadImageFormatException
. However, a simple change to the following allows the assembly to load properly:
ClientResource.net.dll
class Foo
{
public void Method<T>() where T : class {}
}
Obviously, using the class constraint is "ok" to work around the issue temporarily, but I can only assume whatever assembly resolving is being done at load, also contains other such cross-assembly type issues.