Skip to content

Commit 25aa272

Browse files
committed
Fix
1 parent ef70282 commit 25aa272

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,23 @@ public async ValueTask StartSessionAsync(CancellationToken cancellationToken)
7777
{
7878
_logger.Log(MessageDescriptor.HotReloadSessionStarting);
7979

80-
await _hotReloadService.StartSessionAsync(Workspace.CurrentSolution, cancellationToken);
80+
var solution = Workspace.CurrentSolution;
81+
82+
await _hotReloadService.StartSessionAsync(solution, cancellationToken);
83+
84+
// TODO: StartSessionAsync should do this: https://github.com/dotnet/roslyn/issues/80687
85+
foreach (var project in solution.Projects)
86+
{
87+
foreach (var document in project.AdditionalDocuments)
88+
{
89+
await document.GetTextAsync(cancellationToken);
90+
}
91+
92+
foreach (var document in project.AnalyzerConfigDocuments)
93+
{
94+
await document.GetTextAsync(cancellationToken);
95+
}
96+
}
8197

8298
_logger.Log(MessageDescriptor.HotReloadSessionStarted);
8399
}

0 commit comments

Comments
 (0)