Skip to content

Commit

Permalink
Fix assembly resolution with DeploymentItem (#3034)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored May 29, 2024
1 parent 5d5c982 commit a502340
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ public void SetupHost()
// which is trigged by AppContainerUtilities.AttachEventToResolveWinmd method.
EqtTrace.SetupRemoteEqtTraceListeners(AppDomain);

// Force loading Microsoft.TestPlatform.CoreUtilities in the new app domain to ensure there is no assembly resolution issue.
// For unknown reasons, with MSTest 3.4+ we start to see infinite cycles of assembly resolution of this dll in the new app
// domain. In older versions, this was not the case, and the callback was allowing to fully lookup and load the dll before
// triggering the next resolution.
AppDomain.Load(typeof(EqtTrace).Assembly.GetName());

// Add an assembly resolver in the child app-domain...
Type assemblyResolverType = typeof(AssemblyResolver);

Expand Down

0 comments on commit a502340

Please sign in to comment.