Visual Studio cannot find custom tool RazorGenerator
I had that same problem too and I realized that along with the package for the solution you will also need to install the Visual Studio Extension called RazorGenerator
- Go to Tools, then Extension Manager
- Search for Razor Generator
- Click the Download button.
- Once the install has completed, restart Visual Studio.
Comments
-
SliverNinja - MSFT almost 2 years
I've installed the NuGet package for
RazorGenerator.mvc
and then run the shell commandEnable-RazorGenerator
and get the following message:Exception calling "RunCustomTool" with "0" argument(s): "The custom tool 'RazorGenerator' failed. The method or operation is not implemented."At \packages\RazorGenerator.Mvc.1.3.2.0\tools\RazorGenerator.psm1:77 char:40+ $_.Object.RunCustomTool <<<< () + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ComMethodTargetInvocation
I also tried right-clicking and selecting "Run Custom Tool" and it provides a dialog stating it cannot find the custom tool
RazorGenerator
on the system.What am I missing?
-
SliverNinja - MSFT almost 12 yearsThis worked - I didn't know you need to have the RazorGenerator extension too - not just the nuget RazorGenerator.mvc package.
-
Gabe almost 12 yearsYea, I didn't realize it either the documentation didn't really point it out very well... Glad it worked for you.
-
SliverNinja - MSFT over 10 yearsHere is a custom Razor Generator installer for VS2013 Preview to enable Razor Generator as Razor Generator is not yet in the VS 2013 Gallery.
-
sshine over 8 yearsWhy are both the Extension and the NuGet package necessary?
-
Allie over 7 yearsI just installed Visual Studio 15 preview 4 but RazorGenerator does not seem to be available
-
Santiago Rebella over 6 yearsNeed to install the Extension and the nuget package
-
Jon about 6 years@Gabe Maybe worth clarifying that the extension is "Razor Generator" (with the space) - you've written it both ways in the answer above. The extensions search function returns no results for "RazorGenerator" which isn't terribly helpful of it.
-
Gabe about 6 years@Jon well considering this was written 6 years ago it used to be called "RazorGenerator." I'm sorry if my help wasn't helpful enough for you. Based on the feedback it was for many others. I don't have time to update everyone of my answers.
-
Jon about 6 years@Gabe I'm sorry you're so busy. My thinking was: your helpful answer still exists; I found it and others found it (note the other comments from 2013, 2015, 2016, 2017); it could be more helpful. Please excuse me for trying to make the world a better place, says one PA commenter to another.
-
Rodri about 4 yearsI had the same problem. It worked for me in Visual Studio 2013. Thx.
-
WWC almost 4 yearsIn Visual Studio 2017, you can find and install the Razor Generator extension from Tools -> Extensions and Updates.
-
rodrigombs almost 4 yearsJust for an update, in Visual Studio 2019 there is an independent tab just for Extensions. So it should be: Extensions>Manage Extensions