File tree Expand file tree Collapse file tree
src/Adapter/MSTestAdapter.PlatformServices Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ public class AssemblyResolver : MarshalByRefObject, IDisposable
4242 /// </remarks>
4343 private const string LoggerAssemblyName = "Microsoft.TestPlatform.CoreUtilities" ;
4444
45+ /// <summary>
46+ /// The name of the current assembly resources file.
47+ /// </summary>
48+ /// <remarks>
49+ /// When resolving the resources for the current assembly, we need to make sure that we do not log. Otherwise, we will end
50+ /// up either failing or at least printing warning messages to the user about how we could not load the resources dll even
51+ /// when it's not an error. For example, set a culture outside of supported cultures (e.g. en-gb) and you will have an error
52+ /// saying we could not find en-gb resource dll which is normal. For more information,
53+ /// <see href="https://github.com/microsoft/testfx/issues/1598" />.
54+ /// </remarks>
55+ private const string PlatformServicesResourcesName = "Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources" ;
56+
4557 /// <summary>
4658 /// This will have the list of all directories read from runsettings.
4759 /// </summary>
@@ -587,7 +599,8 @@ private static void SafeLog(string? assemblyName, Action loggerAction)
587599 // Logger assembly was in `Microsoft.VisualStudio.TestPlatform.ObjectModel` assembly in legacy versions and we need to omit it as well.
588600 if ( ! StringEx . IsNullOrEmpty ( assemblyName )
589601 && ! assemblyName . StartsWith ( LoggerAssemblyName )
590- && ! assemblyName . StartsWith ( LoggerAssemblyNameLegacy ) )
602+ && ! assemblyName . StartsWith ( LoggerAssemblyNameLegacy )
603+ && ! assemblyName . StartsWith ( PlatformServicesResourcesName ) )
591604 {
592605 loggerAction . Invoke ( ) ;
593606 }
You can’t perform that action at this time.
0 commit comments