Skip to content

Commit 20e9695

Browse files
Disable logging when loading projects
1 parent 746f86e commit 20e9695

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Cli/dotnet/Commands/Test/MSBuildUtility.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ public static (IEnumerable<ParallelizableTestModuleGroupWithSequentialInnerModul
3232
Path.GetDirectoryName(solutionModel.Description)! :
3333
SolutionAndProjectUtility.GetRootDirectory(solutionFilePath);
3434

35-
FacadeLogger? logger = LoggerUtility.DetermineBinlogger([.. buildOptions.MSBuildArgs], dotnetTestVerb);
36-
var collection = new ProjectCollection(globalProperties: CommonRunHelpers.GetGlobalPropertiesFromArgs([.. buildOptions.MSBuildArgs]), loggers: logger is null ? null : [logger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default);
35+
var collection = new ProjectCollection(globalProperties: CommonRunHelpers.GetGlobalPropertiesFromArgs([.. buildOptions.MSBuildArgs]), null, toolsetDefinitionLocations: ToolsetDefinitionLocations.Default);
3736

3837
ConcurrentBag<ParallelizableTestModuleGroupWithSequentialInnerModules> projects = GetProjectsProperties(collection, solutionModel.SolutionProjects.Select(p => Path.Combine(rootDirectory, p.FilePath)), buildOptions);
39-
logger?.ReallyShutdown();
4038

4139
return (projects, isBuiltOrRestored);
4240
}
@@ -50,11 +48,9 @@ public static (IEnumerable<ParallelizableTestModuleGroupWithSequentialInnerModul
5048
return (Array.Empty<ParallelizableTestModuleGroupWithSequentialInnerModules>(), isBuiltOrRestored);
5149
}
5250

53-
FacadeLogger? logger = LoggerUtility.DetermineBinlogger([.. buildOptions.MSBuildArgs], dotnetTestVerb);
54-
var collection = new ProjectCollection(globalProperties: CommonRunHelpers.GetGlobalPropertiesFromArgs([.. buildOptions.MSBuildArgs]), logger is null ? null : [logger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default);
51+
var collection = new ProjectCollection(globalProperties: CommonRunHelpers.GetGlobalPropertiesFromArgs([.. buildOptions.MSBuildArgs]), null, toolsetDefinitionLocations: ToolsetDefinitionLocations.Default);
5552

5653
IEnumerable<ParallelizableTestModuleGroupWithSequentialInnerModules> projects = SolutionAndProjectUtility.GetProjectProperties(projectFilePath, collection, buildOptions.NoLaunchProfile);
57-
logger?.ReallyShutdown();
5854

5955
return (projects, isBuiltOrRestored);
6056
}

0 commit comments

Comments
 (0)