Along with ASP.NET Core, Microsoft introduced Razor Tag Helpers. These Tag Helpers enable HTML friendly development environment with razor code and a useful IntelliSense environment. But, you cannot use the Razor Tag Helper IntelliSense in Visual Studio 2017 right away. For the IntelliSense feature of Tag Helpers, you have to install the Razor Language Service extension. You can download the extension from Visual Studio Market Place. There are a couple of methods to install the Razor Language Service extension. Below are the methods.
Installing Razor Language Service Extension
A. Direct Download Method
In this method, you can download the Razor Language Services directly from the Visual Studio Marketplace website.
- Close the visual studio instances if anything is open.
- Go to Visual Studio Markatplace website https://marketplace.visualstudio.com/items?itemName=ms-madsk.RazorLanguageServices.
- Download the extension by pressing the Download button.
- Double click the downloaded file Microsoft.VisualStudio.RazorExtension.vsix for installing it.
- In the VSIX Installer screen, press Install button. The installation will take few seconds to complete.
- Once installed, open visual studio and test the IntelliSense while using Tag Helpers.
B. Visual Studio Extension & Updates Tool Method
- Launch Visual Studio 2017.
- From the menu go to Tools > Extension and Updates ….
- In the Extension and Updates window, in the left panel, expand Online > Visual Studio Marketplace.
- In the search box at the top right corner, enter “Razor Language Service“.
- The center panel shows the result. The Razor Language Services will be at the top.
- Press the Download button against Razor Language Services.
- The extension will be downloaded and scheduled to be installed once the visual studio is closed. You can see the message at the bottom of the Extension and Updates window.
- Now close all the visual studio instances.
- The installation will automatically starts after closing the visual studio instances.
- In the VSIX Installer, press the Modify button. The installation will take few seconds to complete.
- Once installed, open visual studio and test the IntelliSense while using Tag Helpers.
Related Article
- Upgrading and using bootstrap user interface framework in MVC Core Application.
Reference
- Introduction to Tag Helpers at Microsoft Docs.