Duplicate assembly issue with ReSharper
mwhelan opened this issue · 0 comments
Hi
When I run my NUnit tests with the ReSharper test runner, Simulator is throwing an exception in the Assemblies property of MvcApplication, line 145:
System.ArgumentException : An item with the same key has already been added.
The Linq query on AppDomain.CurrentDomain.GetAssemblies() is returning duplicates, hence the error with duplicate key names being added to the collection. In my test project, this is the particular assembly that has been returned multiple times - JetBrains.ReSharper.UnitTestRunner.nUnit30.dll. Maybe a Distinct() call at the end of the query would resolve it?
When I run the tests with TestDriven.Net the error does not occur, presumably because the ReSharper DLLs are not loaded into the AppDomain.