Comment 2 for bug 1084284

Revision history for this message
David Moore (jdmoore99) wrote :

We are also impacted by this issue. In our case we are also dynamically loading additional assemblies for our unit tests. If we have assembly A.UnitTests.dll, it will look for file A.UnitTests.dll.loader.config during [SetupFixture] for a list of additional dependencies to load.

This configuration file is in A.UnitTests.csproj and is marked as BuildAction=Content and "Copy always" so the configuration file is always built right next to A.UnitTests.dll. If Shadow Copying would honor that build action + bring such files along, I believe it might work.

If there is another way I can package or tag that .config file with my UnitTests so that the shadow copying process would know to bring A.UnitTests.dll.loader.config along with the .dll and .pdb, that would probably work for my case.

Like another poster on this topic, we have a large codebase and we've introduced this dynamic loading complication to avoid endless CopyLocal=True which drastically slows and destabilizes our builds. On our build servers we disable shadow copying for running our test suites both for performance reasons and because it broke for any of our unit tests that needed to perform dynamic loading. If you were to drop support for disabling shadow copying, we'd need a way to tell NUnit's shadow copying to bring along additional files side-by-side with the .dll.