title: Visual Studio not auto-detecting file changes in project
body: <p>I have a VS project with a directory I'm including by wildcard in the csproj file, like this:</p>
  
  <pre><code>&lt;Compile Include="Models\**" /&gt;
  </code></pre>
  
  <p>This is the sequence of events:</p>
  
  <ul>
  <li>a new file is added to the <code>Models</code> directory</li>
  <li>It is committed and pushed to GIT</li>
  <li>Someone else pulls it. (pulled using GIT command outside of VS)</li>
  <li>Person tries to build after the pull, and gets compiler errors about undefined classes.</li>
  </ul>
  
  <p>Restarting VS and reopening solution does NOT make the problem go away.</p>
  
  <p>VS Solution Explorer shows the new files as included, but there is no caret next to the file name. Hitting refresh makes the caret show up, and also causes the compiler errors to go away. This works perfectly, every time.</p>
  
  <p>I'd like to be able to automate this: is there is a way create a pre-build job/script that would do the same thing as clicking the refresh button in the Solution Explorer?</p>
  
  <p>(We've experienced the problem in both VS 2017 and also 2019.)</p>