Search code examples
c#asp.netasp.net-mvcvisual-studio-2017

Why mvcaction4 code snippet does not react?


When I write mvcaction4 and press tab 2 times it doesn't work. Currently I am using Visual Studio 2017 Community Edition.


Solution

  • MVC4 snippets are supported in VS2017. MVC 4 is an optional component that's part of the web workload. If you don't have it installed and try to open an MVC 4 project it should prompt you to add the missing component to Visual Studio.

    Support for MVC 4 is limited. We don't allow you to create new MVC 4 projects, but you can - Open existing MVC 4 projects - Scaffold controllers/views - Use snippets

    EDIT MVC4 snippets will only show up for an MVC 4 project. The snippets are tied to the .csproj/.vbproj ProjectTypeGuid properties.

    Below is a screenshot from MVC4 snippets in VS2017

    enter image description here