Encountered an unexpected error when attempting to resolve tag helper directive ‘@addTagHelper’

Error in Visual Studio 2015:

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

Solution:

Close Visual Studio, and open a file explorer window and navigate to your AppData folder. Go into Local\Microsoft\VisualStudio\,version> and delete ComponentModelCache folder.

Now all is gone well.

LT

 

2 thoughts on “Encountered an unexpected error when attempting to resolve tag helper directive ‘@addTagHelper’

Add yours

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑