title: 'Could not find file ... bin\roslyn\csc.exe'
body: <p>In Visual Studio 2017, when hitting <kbd>Ctrl</kbd>+<kbd>F5</kbd> to
  run my ASP.NET Framework Web API server, I get:</p>
  <pre><code>Could not find file ... bin\roslyn\csc.exe:
  </code></pre>
  <p><a href="https://i.imgur.com/sohAXxi.png" rel="nofollow noreferrer" title="Server Error '/' in Application."><img src="https://i.imgur.com/sohAXxi.png" alt="Server Error '/' in Application." title="Server Error '/' in Application." /></a></p>
  <p>Running
  <code>Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform -r</code>
  in the package manager console is not a permanent fix in the sense
  that the server error appears again when the package files are
  missing.
  How can I get rid of this error once and for all so that the needed
  packages are automatically (and silently) reinstalled as soon as I
  reopen, build, and run my Visual Studio solution?</p>
  <hr />
  <p>Code to reproduce the error:
  <a href="https://user.it.uu.se/%7Ehesc0353/RoslynError-reproduce.zip" rel="nofollow noreferrer">https://user.it.uu.se/~hesc0353/RoslynError-reproduce.zip</a><br />
  (Originally from
  <a href="https://github.com/aspnet/AspNetDocs/tree/master/aspnet/web-api/overview/advanced/calling-a-web-api-from-a-net-client/sample/server/ProductsApp" rel="nofollow noreferrer">https://github.com/aspnet/AspNetDocs/tree/master/aspnet/web-api/overview/advanced/calling-a-web-api-from-a-net-client/sample/server/ProductsApp</a>)</p>