From a89060092ddf47c42428a12fd7d3dc4040b7ac43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Thu, 17 Oct 2024 11:14:18 +0200 Subject: [PATCH] Fix call to EqtTrace (#3952) --- .../MSTestAdapter.PlatformServices/AssemblyResolver.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs b/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs index 06d9a359a4..53a2a392b1 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs +++ b/src/Adapter/MSTestAdapter.PlatformServices/AssemblyResolver.cs @@ -376,7 +376,15 @@ protected virtual // the ResourceHelper's currentlyLoading stack to null if an exception occurs. if (s_currentlyLoading != null && s_currentlyLoading.Count > 0 && s_currentlyLoading.LastIndexOf(assemblyPath) != -1) { - EqtTrace.Info("MSTest.AssemblyResolver.OnResolve: Assembly '{0}' is searching for itself recursively '{1}', returning as not found.", name, assemblyPath); + SafeLog( + name, + () => + { + if (EqtTrace.IsInfoEnabled) + { + EqtTrace.Info("MSTest.AssemblyResolver.OnResolve: Assembly '{0}' is searching for itself recursively '{1}', returning as not found.", name, assemblyPath); + } + }); _resolvedAssemblies[name] = null; return null; }