I'm working primarily with .NET 4.0 using fsi, F# interactive, but I have a couple of dll that I need to access that are only compiled for the .NET 2.0 version of the framework (I checked the manifest they reference mscorlib version 2).
I'm getting a type load exception when I try to use these types. I'm assuming this is because of some .NET 2.0/.NET 4.0 incompatibility when do dynamic type loading etc. The exact error message is:
System.TypeLoadException: Could not load type 'IMyInterface' from assembly 'MyDll, Version=2.3.17.15, Culture=neutral, PublicKeyToken=null'.
The type I’m trying to work with is an interface, I don’t know if this is significant. Using a compiled equivalent of the code works fine.
Is the assumption that this is due to .NET 2.0/.NET 4.0 incompatibility correct? If so is there any way to work round it?