Reputation: 2786
Scriptsharp uses mscorlib 0.7.0.0 which has an implicit operator System.Number on an int32. I understand the reason why it's there although I imagine that the compiler can handle the conversion in another way.
Now I can't use the generated scriptsharp .Dll in an other project (ex unit testing) that uses the standard .Net mscorlib. > 3.0.
> Method not found System.Int32._opImplicit(int32).
Is there a way to "inject" that operator through reflection?
My previous question brought me a bug step further, but this one....
Upvotes: 3
Views: 158
Reputation: 244797
You can't modify types that are already loaded into an appdomain.
The only way I think you could do this is to modify mscorlib.dll and then use that modified version. The Mono Cecil library allows you to do exactly that. Although it requires you to deal with CIL.
Upvotes: 1