BuildHost does not update properly in incremental builds
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
Repro steps:
1. Make a change in [BuildHost](https://github.com/dotnet/roslyn/tree/main/src/Workspaces/MSBuild/BuildHost). Set a breakpoint around where you made the edit.
2. Right-click build [LanguageServer](https://github.com/dotnet/roslyn/tree/main/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer) in VS
3. Open a vscode project which is setup with the following settings for local debugging:
```json
"dotnet.server.waitForDebugger": true,
"dotnet.server.path": "path/to/roslyn/artifacts/bin/Microsoft.CodeAnalysis.LanguageServer/Debug/net9.0/Microsoft.CodeAnalysis.LanguageServer.dll",
```
4. Attach VS when prompted. Once the project is fully loaded in vscode, attach to the dotnet process running BuildHost. e.g. the selected process in below screenshot

Expected behavior:
- Can set and hit the breakpoint from step 1.
Actual behavior:

This could indicate that the target which copies BuildHost into the LanguageServer directory is not working properly with incremental builds.
Contributor guide
Assessment
This issue has not been assessed yet.