Assembly referenced in test project is not loaded
This actually appears to be the way .Net works and on can use the Assembly.GetReferencedAssemblies Method (https://msdn.microsoft.com/en-us/library/system.reflection.assembly.getreferencedassemblies.aspx)
I have an issue where I am testing AssemblyA from AssemblyA.Tests but I am not using any types directly from the test project AssemblyA.Tests. Rather, the types from AssemblyA are instantiated from a third common test assembly that is called by test AssemblyA.Tests. So something like this:
AssemblyA.Tests:
[Test]
public void Should_do_something()
{
CommonTests.ThatUseClassInAssemblyA();
}
My problem is that AssemblyA is not loaded when running the tests. I have switched off shadow copying so it is that. When I create an explicit type from AssemblyA in the test project and instance it then AssemblyA does get loaded when running the tests.
Any ideas?
Using:
C#
NUnit 3.6.1
Resharper Ultimate 2016.3.2 (built 2017 January 26)
Please sign in to leave a comment.