Skip to content

Commit a890600

Browse files
authored
Fix call to EqtTrace (#3952)
1 parent aa1b83e commit a890600

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,15 @@ protected virtual
376376
// the ResourceHelper's currentlyLoading stack to null if an exception occurs.
377377
if (s_currentlyLoading != null && s_currentlyLoading.Count > 0 && s_currentlyLoading.LastIndexOf(assemblyPath) != -1)
378378
{
379-
EqtTrace.Info("MSTest.AssemblyResolver.OnResolve: Assembly '{0}' is searching for itself recursively '{1}', returning as not found.", name, assemblyPath);
379+
SafeLog(
380+
name,
381+
() =>
382+
{
383+
if (EqtTrace.IsInfoEnabled)
384+
{
385+
EqtTrace.Info("MSTest.AssemblyResolver.OnResolve: Assembly '{0}' is searching for itself recursively '{1}', returning as not found.", name, assemblyPath);
386+
}
387+
});
380388
_resolvedAssemblies[name] = null;
381389
return null;
382390
}

0 commit comments

Comments
 (0)