Skip to content

Commit

Permalink
Introduce ProjectManager class to manage MSBuild project files
Browse files Browse the repository at this point in the history
This is a pretty substantial change that reworks the core logic of the MSBuild project
system to enable an important scenario: updating a project when several files change in quick
succession.

In order to fix an issue with OmniSharp not reloading and updating a project in response to
a 'dotnet restore', we must watch four files that might be touched during a restore:

* project.asset.json
* <project-file>.nuget.cache
* <project-file>.nuget.g.props
* <project-file>.nuget.g.targets

To ensure that we don't reload and update a project multiple times in response to multiple file
changes, this PR introduces a simple queue and processing loop using a TPL DataFlow BufferBlock.
  • Loading branch information
DustinCampbell committed Nov 2, 2017
1 parent 941d52e commit 114148e
Show file tree
Hide file tree
Showing 15 changed files with 917 additions and 699 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace OmniSharp.Models.FilesChanged
namespace OmniSharp.FileWatching
{
public enum FileChangeType
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using OmniSharp.FileWatching;
using OmniSharp.Mef;

namespace OmniSharp.Models.FilesChanged
Expand Down
Loading

0 comments on commit 114148e

Please sign in to comment.