Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeLoadException is occurred when trying to detour multiple assemblies. #13

Closed
urasandesu opened this issue Aug 14, 2014 · 0 comments
Closed
Labels

Comments

@urasandesu
Copy link
Owner

When I was porting JustMock's samples to Prig, I got the following exception:

System.TypeLoadException: Could not load type 'Invalid_Token.0x0100040E' from assembly 'StaticMockingSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

It seems that the exception is occurred when detouring the multiple assemblies that are loaded in the same AppDomain. For your information, this issue is NOT occurred when detouring mscorlib and another assembly. Because mscorlib is domain neutral, so it gives the appearance that another AppDomain from the testing program.

@urasandesu urasandesu added the bug label Aug 14, 2014
urasandesu added a commit to urasandesu/Swathe that referenced this issue Aug 14, 2014
* Metadata: [BUG FIX] To perform correctly against [Issue #13](urasandesu/Prig#13) at Prig, change the determination process to not only use the original `AssemblyMetadata` equivalence but also the saved `AssemblyGenerator` equivalence when resolving `AssemblyGenerator` from `AssemblyMetadata`. At the same time, deleted the parts controlling them by some flags. On the whole, changed the setters that take the original `.*Metadata` to extract the original `.*Metadata` recursively if the passed value is `.*Generator`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant