Skip to content

Commit

Permalink
Fix assembly resolution error (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored May 18, 2023
1 parent 3bd8304 commit 507b734
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,17 @@ internal virtual string[] GetFullPathToDependentAssemblies(string assemblyPath,
AppDomain? appDomain = null;
try
{
// Force loading the resource assembly into the current domain so that we can get the resource strings even
// when the custom assembly resolver kicks in.
// This should not be required based on the algorithm followed during the satellite assembly resolution
// https://learn.microsoft.com/dotnet/core/extensions/package-and-deploy-resources#net-framework-resource-fallback-process
// BUT for some unknown reason the point 10 is not working as explained.
// Satellite resolution should fallback to the NeutralResourcesLanguageAttribute that we set to en but don't
// resulting in a FileNotFoundException.
// See https://github.com/microsoft/testfx/issues/1598 for the error and https://github.com/microsoft/vstest/pull/4150
// for the idea of the fix.
_ = string.Format(CultureInfo.InvariantCulture, Resource.CannotFindFile, string.Empty);

appDomain = AppDomain.CreateDomain("Dependency finder domain", null, setupInfo);
if (EqtTrace.IsInfoEnabled)
{
Expand Down

0 comments on commit 507b734

Please sign in to comment.