aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Html TagHelpers aren't purple and bold #920

Open MaherJendoubi opened 7 years ago

MaherJendoubi commented 7 years ago

image

MaherJendoubi commented 7 years ago

image

mlorbetske commented 7 years ago

Hi @MaherJendoubi, are you seeing with with Visual Studio 2015 or Visual Studio 2017 RC? In 2017 RC, tag helper colorization has not yet been added.

MaherJendoubi commented 7 years ago

Hi @mlorbetske, in VS2015 not 2017 RC.

mlorbetske commented 7 years ago

@ToddGrun @NTaylorMullen any ideas?

NTaylorMullen commented 7 years ago

Based off of the screen shot it looks like the Razor tooling is broken on your machine @MaherJendoubi. Prime example being the C# code is not higlighted correctly and the @ symbols that represent Razor transitions aren't yellow.

MaherJendoubi commented 7 years ago

@NTaylorMullen I formatted my PC and new installed VS2015 Pro Update 3. Look what I get :

image

RandyBuchholz commented 7 years ago

I'm experiencing the same thing, VS2015 Community.

NTaylorMullen commented 7 years ago

@MaherJendoubi @RandyBuchholz If you do File => New Web Application and look at the _Layout.cshtml file is TagHelper coloring active?

MaherJendoubi commented 7 years ago

@NTaylorMullen yes

RandyBuchholz commented 7 years ago

I tried four scenarios. I have VS 2015 and 2017 Community with latest updates. I Created two applications in each, targeting Core and Framework

2015 - Framework: Works. 2015 - Core: Fails. 2017 - Framework: (New project doesn't recognize packages (e.g., System). PM> update-package fixes errors.) Fails 2017 - Core: (New project doesn't recognize packages (e.g., System). PM> update-package fixes errors.) Fails

BTW - Intellisense options/auto-complete also fails for TagHelpers, but nothing else.

MaherJendoubi commented 7 years ago

image

NTaylorMullen commented 7 years ago

@MaherJendoubi to fix TagHelper IntelliSense in your own project you can try the following https://github.com/aspnet/Tooling/issues/484#issuecomment-219807702 fixes I suggested. That post is relatively old so you may need to change the versions of things that I mentioned there to match what you have in your project. If in doubt refer to the File => New Web Application for appropriate versions.

MaherJendoubi commented 7 years ago

@NTaylorMullen Thank you for the hint!

NTaylorMullen commented 7 years ago

@RandyBuchholz VS 2017 doesn't currently have TagHelper IntelliSense so those failures are expected. As for the .net Core bits failing on 2015. That definitely should not be the case. Could you provide a repro project for me to look at?

RandyBuchholz commented 7 years ago

@NTaylorMullen Sure, I'll put one together. How would you like me to structure it to make it most helpful?

NTaylorMullen commented 7 years ago

If you just did File => New Web Application and posted what VS created for you that'd be great 😄.

RandyBuchholz commented 7 years ago

@NTaylorMullen Here you go: https://github.com/RandyBuchholz/TagHelperIntellisenseIssue

NTaylorMullen commented 7 years ago

@RandyBuchholz TagHelper IntelliSense works for me. There may be something wrong with your installation. I'd ensure that your'e Visual Studio is up-to-date. image

RandyBuchholz commented 7 years ago

Like @MaherJendoubi I'm on a fresh install with updates. I do remember thinking that when I did my install it seemed there were some option settings pulled in automatically. I wondered about it, and thought they may had came from a profile/config stored on my MS account. I didn't think much of it at the time. I'll reinstall and make sure I have a "raw" install and go from there. Possibly a conflict with an extension that may have been pulled in too.

hellojiaru commented 7 years ago

Hi @NTaylorMullen , could you tell when VS 2017 will support the IntelliSense of TagHelper?

NTaylorMullen commented 7 years ago

@hellojiaru We don't currently have a date but it's actively being worked on. We're doing all the work in the open over at https://github.com/aspnet/Razor. Keep an eye there to see how it all progresses 😄

hellojiaru commented 7 years ago

@NTaylorMullen , Thanks