title: How can I make my project work with both v15.0 and v15.9 build tools?
body: <p>We have two build servers and a newly created project has decided that it only wants to build successfully on one of them. It gives this error on the build server on which it fails:</p>
  <blockquote>
  <p>MyLovelyNewProject.csproj(380,11): error MSB4226: The imported project &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets&quot; was not found. Also, tried to find &quot;WebApplications\Microsoft.WebApplication.targets&quot; in the fallback search path(s) for $(VSToolsPath) - &quot;C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0&quot; . These search paths are defined in &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\MSBuild.exe.Config&quot;. Confirm that the path in the  declaration is correct, and that the file exists on disk in one of the search paths.</p>
  </blockquote>
  <p>Our DevOps guy investigated and determined that one server has the v15.0 build tools and one of them has the v15.9 build tools. The new project fails to build on the server that has the v15.9 build tools, since it's specifically looking for the v15.0 build tools.</p>
  <p>All of our other projects build just fine on both build servers, but I wasn't able to find anything in their .sln or .csproj files that looked different from the new project. <strong>How can I retarget/reconfigure the new project so that it will build successfully regardless of which version of the build tools a given server has?</strong></p>
  <p>(If you want to suggest that DevOps synchronize the build servers to have the same version of the build tools, I agree! Alas, they're busy with a major server migration, and I would like the new project to not have a 50% chance of failing in CI while they're getting around to it.)</p>