Can you show me a way to troubleshoot System.TypeLoadException ?
I am having this exception for an existing project in my solution which I reference from a unit test project in the same solution.
This exeption is thrown when I run my unit tests. They fail because of this exception:
Details:
Test method MyErrorHandler.Test.MyTest.Parse_RecievesValidMessage_ReturnsArray threw exception: System.TypeLoadException: Could not load type 'MyTestNameSpace' from assembly 'MyTestAssemblyName.Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=Somenumber.
What should I check or where should I start to investigate?
One situation where this exception is thrown is if the executing assembly has the same name as the assembly with the given type. For example, if you are running MyApp.exe and the type is in MyApp.dll, the CLR will assume that the type should be in MyApp.exe. A solution would be to rename one of those assemblies.