Skip to content

Commit af755ea

Browse files
Added support for IProgress<ProjectLoadProgress> to MSBuild (#353)
Should provide even better startup logging
1 parent 16a2294 commit af755ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Incrementalist.Cmd/Commands/EmitDependencyGraphTask.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ public async Task<BuildAnalysisResult> Run()
4646
_cts.CancelAfter(Settings.TimeoutDuration);
4747

4848
Logger.LogInformation("Opening solution {Solution}...", Settings.SolutionFile);
49-
var solution = await Workspace.OpenSolutionAsync(Settings.SolutionFile, null, _cts.Token);
49+
var progress = new Progress<ProjectLoadProgress>(x =>
50+
{
51+
Logger.LogDebug("{Operation} project {Project} in {ElapsedTime}", x.Operation, x.FilePath, x.ElapsedTime);
52+
});
53+
var solution = await Workspace.OpenSolutionAsync(Settings.SolutionFile, progress, _cts.Token);
5054
Logger.LogInformation("Solution opened successfully. Gathering solution files...");
5155

5256
var getFilesCmd = new GatherAllFilesInSolutionCmd(Logger, _cts.Token, Settings.WorkingDirectory);

0 commit comments

Comments
 (0)