Visual Studio中无法找到自定义工具RazorGenerator

问题描述:

我已经安装了的NuGet包 RazorGenerator.mvc 然后运行shell命令启用-RazorGenerator 并获得以下信息:

I've installed the NuGet package for RazorGenerator.mvc and then run the shell command Enable-RazorGenerator and get the following message:

异常调用RunCustomTool和0的说法(S)。自定义工具'RazorGenerator'失败的方法或操作未实现在\\包\\ RazorGenerator.Mvc.1.3.2.0 \\工具\\ RazorGenerator名为.psm1:77字符:40 + $ _ Object.RunCustomTool<<<<。 ()+ CategoryInfo:NotSpecified:(:) [],MethodInvocationException + FullyQualifiedErrorId:ComMethodTargetInvocation

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

我也试过用鼠标右键单击并选择运行自定义工具,它提供了一个对话框,说明它无法找到自定义工具 RazorGenerator 在系统上。

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.

我是什么失踪?

我有同样的问题太多,我意识到,与包的解决方案一起,你还需要安装Visual Studio扩展名为 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


  • 转到工具扩展管理器

  • 搜索剃须刀发电机

  • 点击下载按钮。

  • 一旦安装完成,重新启动 Visual Studio中。

  • Go to Tools, then Extension Manager
  • Search for Razor Generator
  • Click the Download button.
  • Once the install has completed, restart Visual Studio.