diff options
author | Matt Ward <matt.ward@microsoft.com> | 2021-02-25 16:44:23 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@microsoft.com> | 2021-02-25 21:15:57 +0300 |
commit | 675b5efe8b3c8f1f0e488e8dff194a6589db3a83 (patch) | |
tree | 0591c481fb198cd225d1da353f9e2b9907401373 | |
parent | d0821012bf30ce2771d1bc878a34f6bd555b00ba (diff) |
Use Assembly.LoadFrom instead of LoadFile so dependencies are resolved
Running GuiUnit under .NET 6 causes test assembly dependencies not
to be resolved even though a parent process has already called
Assembly.LoadFrom. It seems that a call to LoadFile for the assembly
results in dependencies not being resolved. Switch to LoadFrom which
will resolve dependencies.
-rw-r--r-- | src/framework/GuiUnit/TestRunner.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/framework/GuiUnit/TestRunner.cs b/src/framework/GuiUnit/TestRunner.cs index 7719fd4..4661107 100644 --- a/src/framework/GuiUnit/TestRunner.cs +++ b/src/framework/GuiUnit/TestRunner.cs @@ -46,7 +46,7 @@ namespace GuiUnit static TestRunner () { LoadFileMethod = typeof(Assembly).GetMethods ().FirstOrDefault (m => { - return m.Name == "LoadFile" && m.GetParameters ().Length == 1 && m.GetParameters () [0].ParameterType == typeof(string); + return m.Name == "LoadFrom" && m.GetParameters ().Length == 1 && m.GetParameters () [0].ParameterType == typeof(string); }); } |