OmniSharp / omnisharp-roslyn

OmniSharp server (HTTP, STDIO) based on Roslyn workspaces
MIT License
1.76k stars 420 forks source link

Monitor Directory.Build.props changes #2524

Open loligans opened 1 year ago

loligans commented 1 year ago

I have a solution with many Directory.Build.props. Omnisharp should monitor changes to those Directory.Build.props.

Here is the project structure

ProjectRoot/
  - Directory.Build.props
  - src/
      - Directory.Build.props
      - Project1/
          - Project1.csproj
      - Project2/
          - Project2.csproj
  - tests/
      - Directory.Build.props
      - Project1Tests/
          - Project1Tests.csproj 

The Directory.Build.props located at ProjectRoot/src/Directory.Build.props internally contains a reference to the Build props located at ProjectRoot/Directory.Build.props. The reference looks like this:
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />

So how this works is Project1 loads the Build props located at ProjectRoot/src/Directory.Build.props which references the Build prop located at ProjectRoot/Directory.Build.props. The problem is if I make a change to any of the Directory.Build.props, I have to manually restart OmniSharp in order for the changes to propagate.

This issue is to request a feature in OmniSharp to monitor changes in the Directory.Build.props and propagate those changes without having to manually restart OmniSharp.

alexrp commented 1 year ago

Similar, common files that should probably be included in this: Directory.Build.targets, Directory.Packages.props, Directory.Build.rsp