diff options
author | nosami <jasonimison@gmail.com> | 2019-07-23 23:35:19 +0300 |
---|---|---|
committer | nosami <jasonimison@gmail.com> | 2019-07-25 11:58:55 +0300 |
commit | dc2139c1c55e12620313ed8cb07b5cf6c7907535 (patch) | |
tree | db9362655700739b8d2f9acbd64e3826d89237a3 /main/src/addins/MonoDevelop.UnitTesting.NUnit | |
parent | 82107ab37be406c89d3652c1b7a2a27f7ca8710b (diff) |
Use support assemblies when trying to resolve
Support assemblies should always be used if they have already
been loaded.
Fixes UI tests when running locally.
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting.NUnit')
-rw-r--r-- | main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs b/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs index 903745c6b0..2b1e9e1c16 100644 --- a/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs +++ b/main/src/addins/MonoDevelop.UnitTesting.NUnit/NUnit3Runner/NUnitTestRunner.cs @@ -56,6 +56,7 @@ namespace NUnit3Runner {
engine = TestEngineActivator.CreateInstance (); filterService = engine.Services.GetService<ITestFilterService>(); + AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; } [MessageHandler] @@ -223,7 +224,13 @@ namespace NUnit3Runner } } } - + + Assembly CurrentDomain_AssemblyResolve (object sender, ResolveEventArgs args) + { + var name = new AssemblyName (args.Name); + return AppDomain.CurrentDomain.GetAssemblies ().FirstOrDefault (a => AssemblyName.ReferenceMatchesDefinition (name, a.GetName ())); + } + private TestFilter CreateTestFilter (string[] nameFilter) { ITestFilterBuilder builder = filterService.GetTestFilterBuilder(); |