• J
    Fix bug where references didn't always have a file watcher · 441d055d
    Jason Malinowski 提交于
    When we created metadata references inside of VisualStudioProject,
    we ensured we created them with a file watcher so we would know about
    changes. When we created a metadata reference after we converted a
    project reference back to a metadata reference that was originally
    a metadata reference, we didn't do so since that conversion happens
    in VisualStudioWorkspaceImpl itself and it couldn't access the file
    watcher.
    
    This fixes this. The majority of the work here is just moving code
    around. Basically the watchers were per-project, which meant that
    it'd be forbidden to call into them the Workspace code because
    that would violate the lock hierarchy. To fix this, I move the file
    watching logic into it's own little type with a lock, and since no
    calls are made back into the workspace under that lock, it removes
    the deadlock concerns.
    
    Fixes dotnet/roslyn#32554.
    441d055d
TestEnvironment.vb 13.1 KB