TagHelpers not highlighted?
HEy All,
When I fire up a new web application project for ASP NET Core 1 none of the Tag helpers seem to light up and I do not get intellisense in my tags for asp-. Any ides on how to get that back? For example adding an asp-for to a div tag does not turn the asp-for the purple color it was I think in RC1.
@chassq Have you built the project? That's currently a requirement for TagHelper IntelliSense.
Same issue on my side
@Pictuel for a new web application unchanged?
I actually can see the highlighting and intellisense on a new project but on an upgraded project from RC1 I do not see the highlighting.
no, my application is a port from rc1, taghelpers seems to works fine when the app is running but are not higlighted nor intellisensed on vs
For an upgraded app you need to ensure the following: https://github.com/aspnet/Tooling/issues/484#issuecomment-219807702
still nothing for me, everything was set as you said except for:
"Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-*" },
@Pictuel what dotnet are you using and what version of Microsoft.NETCore.App is being resolved?
- Can find out the dotnet version by typing
dotnet --infoin the package manager console window in Visual Studio. - Cna find out the
Microsoft.NETCore.Appversion by looking in yourproject.lock.jsonfile.
my dotnet -v is 1.0.0-preview1-002702 (this is the version also set in my global.json)
and Microsoft.NETCore.App seems to be 1.0.0-rc2-3002702 (now set in project.json)
These entries look correct in my project.
Could both of you push a minimal repro to GitHub so I could take a look?
Hey, paired down a simple web site I had converted from RC1 to RC2. See attached zip file. You should see the issue if you navigate to the Views->Account-Login.cshtml file. At least when I open it the tag helpers are not highlighted nor do I get intellisense for asp-* attributes. Hope this helps!
PS Took out bower and node module folders so it will have to restore them. SampleWebSite.zip
I'm afraid I don't have any project to share.
Somehow mine is highlighted now, probably a reboot made it work again, weird.
@chassq So I looked at your project and it seems your issue is tied to this bug which I have a PR out for.
Ultimately, to fix your issue change your @addTagHelper statements to be unquoted.
Aka @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Yep, that did the trick!! Thanks!!