title: ASP.Net Core MVC missing assembly reference
body: <p>I try to do an login page in Visual Studio 2017 using MVC Empty template. The database connection, the migration and front end code with bootstrap has been done successfully and necessary configuration files and NuGet packages also installed/updated, While I run this application I'm facing this error lines as internal server error</p>
  <blockquote>
  <p>One or more compilation references are missing. Ensure that your project is referencing 'Microsoft.NET.Sdk.Web' and the 'PreserveCompilationContext' property is not set to false.</p>
  <p>The type or namespace name 'Hosting' does not exist in the namespace 'Microsoft.AspNetCore.Razor' (are you missing an assembly reference?)</p>
  </blockquote>
  <p>and the added NuGetPackages are</p>
  <ol>
  <li>Bootstrap</li>
  <li>BuildBundlerMinifier</li>
  <li>Microsoft.AspNetCore.All</li>
  <li>Microsoft.VisualStudio.Web.CodeGeneration.Design</li>
  <li>Microsoft.AspNetCore.App</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/6NfYM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6NfYM.png" alt="enter image description here" /></a></p>