VSIX 1.5.4 and Nuget 1.5.5: Custom tool failed error

Apr 3, 2013 at 9:15 PM
Edited Apr 3, 2013 at 9:17 PM
Getting the "The custom tool 'RazorGenerator' failed. The method or operation is not implemented." error. This prevents me from creating the .cs file necessary.

I have the file located in a a folder named ~/Helpers directly in my project (I tried moving it under ~/Views, but still no luck). Build Action set to "None". Custom Tool set to "RazorGenerator".

I've seen a couple of old threads regarding this, but none of the fixes seem to work (or are confusing).

I installed VSIX 1.5.4 then later installed Nuget 1.5.5 to see if it would work.

I started my file with this:
@* Generator : MvcHelper *@
@using System.Linq.Expressions
@using MyNamespace.ViewModels
@using MyNamespace.Models
@model MyData
I just have a bunch of these in the file:
@helper StartingCost(Decimal startingcost, String chapter)
    <text><u>Based on your selection:</u>
    <br />
    @:The starting fee is @String.Format("{0:C0}", startingcost) for a @chapter.
I am using Orchard CMS, so I cannot place these @helper's in a .cshtml file under ~/App_Code like in a regular MVC project. Was hoping to get this working because I have tons of @helper's and I don't want to have to sprinkle all my views with duplicative @helper's. This appears to work in Orchard as I have seen at least one module with an auto-generated .cs file.

Appreciate any thoughts (whether or not there is a fix, or which fix is the right one).