Visual Studio cannot find custom tool RazorGenerator

20,613

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.
Share:
20,613
SliverNinja - MSFT
Author by

SliverNinja - MSFT

Coding with annoyingly high integrity

Updated on July 09, 2022

Comments

  • SliverNinja - MSFT
    SliverNinja - MSFT almost 2 years

    I've installed the NuGet package for RazorGenerator.mvc and then run the shell command Enable-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
    SliverNinja - MSFT almost 12 years
    This worked - I didn't know you need to have the RazorGenerator extension too - not just the nuget RazorGenerator.mvc package.
  • Gabe
    Gabe almost 12 years
    Yea, I didn't realize it either the documentation didn't really point it out very well... Glad it worked for you.
  • SliverNinja - MSFT
    SliverNinja - MSFT over 10 years
  • sshine
    sshine over 8 years
    Why are both the Extension and the NuGet package necessary?
  • Allie
    Allie over 7 years
    I just installed Visual Studio 15 preview 4 but RazorGenerator does not seem to be available
  • Santiago Rebella
    Santiago Rebella over 6 years
    Need to install the Extension and the nuget package
  • Jon
    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
    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
    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
    Rodri about 4 years
    I had the same problem. It worked for me in Visual Studio 2013. Thx.
  • WWC
    WWC almost 4 years
    In Visual Studio 2017, you can find and install the Razor Generator extension from Tools -> Extensions and Updates.
  • rodrigombs
    rodrigombs almost 4 years
    Just for an update, in Visual Studio 2019 there is an independent tab just for Extensions. So it should be: Extensions>Manage Extensions