This project is read-only.

Upgrading RazorGenerator to 1.3.2; custom tool execution fails

Feb 5, 2012 at 11:59 PM

 

After upgrading RazorGenerator, changes to my .CSHTML files don't automatically generate a .CS file.   If I try to invoke the custom tool manually (via right click in VS2010, execution fails.   

If I drop down to a Package Manager console and invoke 'Redo-RazorGenerator', I get the following message, seemingly for each .CSHTML in the project:

Exception calling "RunCustomTool" with "0" argument(s): "The custom tool 'RazorGenerator' failed.  The method or operation is not implemented."At <path-to-solution>\packages\RazorGenerator.Mvc.1.3.2.0\tools\RazorGenerator.psm1:77 char:40+                 $_.Object.RunCustomTool <<<< ()    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException    + FullyQualifiedErrorId : ComMethodTargetInvocation

 

Any thoughts?

Coordinator
Feb 6, 2012 at 1:17 AM

That's strange. This is what might happen if it was not correctly installed.

  • Do you see this when you try it on a brand new solution?
  • Does it show as being installed when you go under Tools / Extension Manager?
Feb 22, 2012 at 3:36 AM

I ran into this issue as well. It occured after I had installed the RazorGenerator extension in Visual Studio ... _but_ didn't restart visual studio.

After restarting visual studio this seemed to work fine.

Not sure how the other visual studio extensions force that "You must restart Visual Studio" message, but it could be useful here

Coordinator
Feb 22, 2012 at 5:58 AM

I always assumed that this "restart" message happened automatically based on VS noticing that some files are in use. Though maybe it's not quite working correctly.

Coordinator
Feb 22, 2012 at 4:59 PM

I just noticed that this happens on my box too if I do a fresh install. Does seem like a bug in VS though where it decides it doesn't need a restart but fails to load the extension.

Feb 23, 2012 at 8:30 PM

I have the same issue.



Exception calling "RunCustomTool" with "0" argument(s): "Cannot find custom tool 'RazorGenerator' on this system."
At <pathtoproject>\MVC4Test\packages\RazorGenerator.Templating.1.2.1\tools\RazorGenerator.psm1:76 char:40
+                 $_.Object.RunCustomTool <<<< ()
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation

 

This is the first time I have installed RazorGenerator and I have restarted VS after installing it.

Coordinator
Feb 26, 2012 at 5:20 PM

Odd. Could you run VS with the log switch (http://msdn.microsoft.com/en-us/library/ms241272.aspx) and paste in what the log says? Might help to figure out what's affecting it