@@ -119,9 +119,10 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke
119
119
} ;
120
120
}
121
121
122
- if ( ! await BuildProjectAsync ( rootProjectOptions . ProjectPath , rootProjectOptions . BuildArguments , iterationCancellationToken ) )
122
+ var ( buildSucceeded , buildOutput , _) = await BuildProjectAsync ( rootProjectOptions . ProjectPath , rootProjectOptions . BuildArguments , iterationCancellationToken ) ;
123
+ BuildUtilities . ReportBuildOutput ( Context . Reporter , buildOutput , buildSucceeded , projectDisplay : rootProjectOptions . ProjectPath ) ;
124
+ if ( ! buildSucceeded )
123
125
{
124
- // error has been reported:
125
126
continue ;
126
127
}
127
128
@@ -325,7 +326,12 @@ void FileChangedCallback(string path, ChangeKind kind)
325
326
var buildResults = await Task . WhenAll (
326
327
projectsToRebuild . Values . Select ( projectPath => BuildProjectAsync ( projectPath , rootProjectOptions . BuildArguments , iterationCancellationToken ) ) ) ;
327
328
328
- if ( buildResults . All ( success => success ) )
329
+ foreach ( var ( success , output , projectPath ) in buildResults )
330
+ {
331
+ BuildUtilities . ReportBuildOutput ( Context . Reporter , output , success , projectPath ) ;
332
+ }
333
+
334
+ if ( buildResults . All ( result => result . success ) )
329
335
{
330
336
break ;
331
337
}
@@ -675,7 +681,8 @@ await FileWatcher.WaitForFileChangeAsync(
675
681
}
676
682
}
677
683
678
- private async Task < bool > BuildProjectAsync ( string projectPath , IReadOnlyList < string > buildArguments , CancellationToken cancellationToken )
684
+ private async Task < ( bool success , ImmutableArray < OutputLine > output , string projectPath ) > BuildProjectAsync (
685
+ string projectPath , IReadOnlyList < string > buildArguments , CancellationToken cancellationToken )
679
686
{
680
687
var buildOutput = new List < OutputLine > ( ) ;
681
688
@@ -694,17 +701,10 @@ private async Task<bool> BuildProjectAsync(string projectPath, IReadOnlyList<str
694
701
Arguments = [ "build" , projectPath , "-consoleLoggerParameters:NoSummary;Verbosity=minimal" , .. buildArguments ]
695
702
} ;
696
703
697
- Context . Reporter . Output ( $ "Building ' { projectPath } ' ...") ;
704
+ Context . Reporter . Output ( $ "Building { projectPath } ...") ;
698
705
699
706
var exitCode = await ProcessRunner . RunAsync ( processSpec , Context . Reporter , isUserApplication : false , launchResult : null , cancellationToken ) ;
700
- BuildUtilities . ReportBuildOutput ( Context . Reporter , buildOutput , verboseOutput : exitCode == 0 ) ;
701
-
702
- if ( exitCode == 0 )
703
- {
704
- Context . Reporter . Output ( "Build succeeded." ) ;
705
- }
706
-
707
- return exitCode == 0 ;
707
+ return ( exitCode == 0 , buildOutput . ToImmutableArray ( ) , projectPath ) ;
708
708
}
709
709
710
710
private string GetRelativeFilePath ( string path )
0 commit comments