title: ReSharper - Document Saved Event For Inactive File in Visual Studio
body: <p>I’ve set up my own source control plug-in for Visual Studio. </p>
  
  <p>It’s registered with visual studio and can be selected from the list of Source Control plug-ins. </p>
  
  <p>I’ve got no issues with files that are modified from with in Visual Studio as I’m using to catch the event before save:
  <strong>IVsRunningDocTableEvents3</strong></p>
  
  <p>If the file isn’t loaded as an active document in Visual Studio, I’m having problems detecting that it is about to be edited so I can check it out of Source Control. </p>
  
  <p>I’ve tried using the ReSharper event – DocumentManagerOperations suggested here:</p>
  
  <p><a href="https://resharper-support.jetbrains.com/hc/en-us/community/posts/205991489-Document-Saved-Event" rel="nofollow noreferrer">https://resharper-support.jetbrains.com/hc/en-us/community/posts/205991489-Document-Saved-Event</a></p>
  
  <p>I’m having issues detecting if these types of files need checked out:</p>
  
  <ul>
  <li><p>.DotSettings. – When saving the ReSharper options settings</p></li>
  <li><p>csproj – When adding Nuget Packages with ReSharper.</p></li>
  <li><p>.cs when editing files that are not opened in VS with ReSharper, i.e.
  fix naming in project.</p></li>
  </ul>
  
  <p>Is there an event that’s triggered when a file is edited but not loaded?</p>
  
  <p>Thank you!</p>