aspnet / Tooling

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

TagHelper Intellisense Not Working in ASP.NET Core Web Application (.NET Framework) #846

Closed jsvb1977 closed 7 years ago

jsvb1977 commented 8 years ago

Creating a .Net Core Project targeting the full .NET Framework in VS 2015 Update 3 with Preview 2 Tooling results in Tag Helper broken intellisense. Color-coding is also broken.

Tag Helpers work properly, just the intellisense is broken.

Tag Helpers work when creating a 'cross-platform' .NET Core project, FYI.

saf-itpro commented 8 years ago

I have the same issue (also described here) with latest updates for VS2015 already installed.

jsvb1977 commented 7 years ago

Update: The latest version of tooling released this week (11/16/2016) did not resolve this issue.

NTaylorMullen commented 7 years ago

Trying this out on my box and I'm getting IntelliSense. Could one of you share a repro?

jsvb1977 commented 7 years ago

I will try (assuming a 'repro' is simply the steps taken to reproduce the described issue). These are from a clean install of Visual Studio 2015 with Update 3:

  1. File > New Project > Templates > Visual C# > Web
  2. Select ASP.NET Core Web Application (.NET Framework) and click "OK"
  3. In the "Select a template:" dialog, choose Web Application and click "OK"
  4. Let all References finish Restoring
  5. Expand Views > Shared > and open _Layout.cshtml
  6. Note that the asp-* tag helpers in the navigation ul tag are not colored purple.
  7. Start typing a new asp-* tag helper in a tag of a list item and note that intellisense does not work.

Now, if I follow the same steps as described above, but in step 2 I select an ASP.NET Core Web Application (.Net Core)... I have color-coding as well as intellisense for tag helpers.

Let me know if there is anything else I can do.

NTaylorMullen commented 7 years ago

@jsvb1977 have you built your project? For .NET Framework based projects the tooling system needs to read the output of your project to provide you TagHelper IntelliSense. Following your steps directly I do not get IntelliSense either; however, building the project then lights the IntelliSense up.

jsvb1977 commented 7 years ago

@NTaylorMullen After building the project, color-coding and intellisense is working as expected. It was not immediate. The 'dust' needed to settle first.

I feel silly.

NTaylorMullen commented 7 years ago

We all have those moments 😄. Glad everything's working!

vankampenp commented 7 years ago

Sorry to say it is not working for me. Here are my steps:

  1. Create new Web Application, no authentication
  2. Build solution, open _Layout.cshtml, notice taghelper color coding.
  3. Go to Manage NuGet Packages, do not include prereleases, and update everything. Repeat update for remaining packages.
  4. Notice that color coding for tag helpers is still present
  5. Manage NuGet Packages, include prereleases, and update Razor Tools to 1.1.0-preview4-final "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final"
  6. Notice that color coding and intellisense are no longer available for tag helpers, even after building the project.
  7. Be sorry and downgrade Razor Tools to 1.0.0-preview4-final. Notice that intellisense has not returned.