Repository navigation
Commit 9a7cdc5
committed
Work around Roslyn HotReload project-level analysis being disabled
dotnet/roslyn#81729 introduced AbstractEditAndContinueAnalyzer.EnableProjectLevelAnalysis
(default false) and only sets it to true in the HotReloadService(HostWorkspaceServices, ...)
constructor overload. dotnet-watch uses the other primary constructor
(SolutionServices, Func<...>), so the flag stays false. This disables detection of
project-level changes (e.g. newly added <ProjectReference>), causing hot reload to
apply deltas against a stale project graph and the watched app to crash with
FileNotFoundException on the missing dependency.
Enable the flag via reflection until Roslyn sets it in both constructors.1 parent 60f8828 commit 9a7cdc5
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
67 | 81 | | |
68 | 82 | | |
69 | 83 | | |
| |||
0 commit comments