This project is read-only.

The Custom tool 'RazorGenerator' has failed.

Jun 11, 2012 at 4:59 PM
Edited Jun 11, 2012 at 5:09 PM

using VisualStudio2010, SP1

Razor Generator 1.3.2 (is visible under Tools -> Extension Manager)

RazorGenerator.Mvc 1.4.0 (via nuget)

I added a test Mvc4 'Internet Application' project and have assigned the 'Custom Tool' for the Index.cshtml as RazorGenerator as per your tutorial:

The issue is no .cs file is generated! When I manually run the tool by right clicking the view .cshtml and selecting 'Run Custom Tool' I get 

>The Custom tool 'RazorGenerator' has failed.

I looked at this previous discussion and ran VS with the /log flag however nothing is added to the log file after the error is generated.

I've tried rebooting VS and the PC.

Please help me as I am at wits end.

Jun 19, 2012 at 5:12 PM

To eliminate some variables, can you try running this sample project? Does Run Custom Tool fail in the same way there?

Jun 20, 2012 at 8:52 AM
Edited Jun 20, 2012 at 8:56 AM

David, thanks for your reply, and apologies for calling you out on Twitter - you had responded to a post above mine that was barely coherent and I was feeling very unloved! :)

Initially I couldn't open the sample project, however I guessed its MVC3 and for some reason this wasn't installed (even tho I 'installed' it using the Web Platform installer it still didnt show up in add/remove programs nor were the project templates available in VS, ie it wasnt installed)

After manually installing mvc3 (standalone package) everything now works (your test project and mine)

Prior to this I had MVC2 and MVC4 installed and RazorGenerator did not work (error as above) in this configuration. I didnt think mvc3 was a prerequisite for RazorGenerator? 


Thanks again

Jun 20, 2012 at 5:41 PM

Yes, the generator is compiled against Mvc 3 and WebPages v1, so it would need them installed. We could consider distributing them inside the vsix, but chances are without Mvc \ Razor tooling installed, you aren't getting any intellisense in VS which is probably less than ideal.