Skip to content

Commit

Permalink
Reinstate belt and braces approach to loading extensions from mixed r…
Browse files Browse the repository at this point in the history
…untimes
  • Loading branch information
ChrisMaddock authored Jan 10, 2021
1 parent 7682d4a commit bd0d308
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/NUnitEngine/nunit.engine.core/Services/ExtensionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,13 @@ private void Visit(string filePath)
/// </summary>
internal void FindExtensionsInAssembly(ExtensionAssembly assembly)
{
log.Info("Scanning {0} assembly for Extensions", assembly.FilePath);
log.Info($"Scanning {assembly.FilePath} for Extensions");

if (!CanLoadTargetFramework(Assembly.GetEntryAssembly(), assembly))
{
log.Info($"{assembly.FilePath} cannot be loaded on this runtime");
return;
}

IRuntimeFramework assemblyTargetFramework = null;
#if NETFRAMEWORK
Expand Down Expand Up @@ -539,4 +545,4 @@ internal static bool CanLoadTargetFramework(Assembly runnerAsm, ExtensionAssembl
}
}
}
#endif
#endif

0 comments on commit bd0d308

Please sign in to comment.