Encountered an unexpected error when attempting to resolve tag helper directive '@addTagHelper'
<p>I'm using Visual Studio 2015 Community edition, and I've created an ASP.NET MVC 5 project.</p>

<p>When I open a view (<code>Index</code> of <code>Home</code> or any other), it shows first three lines of the page underlined with red as a syntax issue. Here is the error:</p>

<blockquote>
  <p>Encountered an unexpected error when attempting to resolve tag helper
  directive '@addTagHelper' with value 'Microsoft.AspNet.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNet.Mvc.Razor'.
  Error: Object reference not set to an instance of an object</p>
</blockquote>

<p>The screenshot:</p>

<p><a href="https://i.stack.imgur.com/2j0e5.jpg"><img src="https://i.stack.imgur.com/2j0e5.jpg" alt="@addTagHelper error message"></a></p>

<p>When I build the project, it build successfully. When I run it, it shows a lot of errors, but it runs the application.</p>

<p><a href="https://i.stack.imgur.com/a0Bgq.jpg"><img src="https://i.stack.imgur.com/a0Bgq.jpg" alt="Index View with errors"></a></p>

<blockquote>
  <p>The type or namespace name 'Mvc' does not exist in the namespace
  'Microsoft.AspNet' (are you missing an assembly reference?)</p>
</blockquote>

<p>and</p>

<blockquote>
  <p>'_Page_views_home_index_cshtml.ExecuteAsync()': no suitable method
  found to override</p>
</blockquote>

<p>How can I get rid of this?</p>