Jacques Olivier
Jacques Olivier

Reputation: 179

Microsoft.AspNet.Mvc.TagHelpers not working in MVC 6 Razor View

Good Day People, I'm having a strange issue in my Mvc6 project. For some reason, since i did the VS2015 Update 3 my @addTagHelper isnt being recognized.

enter image description here

Resulting in the issue seen below

enter image description here

Ive tried various solutions found online but none have worked. Most commonly people say that that Microsoft.AspNet.Mvc.TagHelpers should be added to the project.json file, which i have done...

enter image description here

Im banging my head against the wall with this issue as i honestly dont know what else to do... Any help will be greatly appreciated! Thanks!

Upvotes: 1

Views: 291

Answers (1)

Jacques Olivier
Jacques Olivier

Reputation: 179

Turns out that it was resharper causing this issue. To fix it all i had to do was exclude .cshtml from the resharper list.

To do this click on Resharper in VS tab, select Options. Navigate to Code Inspection and select Settings. Add *.cshtml to the File Masks box on the bottom right of the screen. Click save and all Tag Helper errors should be gone.

Upvotes: 1

Related Questions