"Pluggable" area projects and view paths

Oct 11, 2013 at 1:03 PM
Hi, we have a main MVC project that pulls in "pluggable areas" (which are other MVC projects) by copying them into the Areas folder on post-build. T4MVC in the pluggable project will generate something like this for the views: public readonly string Index = "~/Views/Upload/Index.cshtml";
but then when that is pulled into the main project, it doesn't match the real path which is now: "~/Areas/Payroll/Views/Upload/Index.cshtml";
Is there a way I can modify the settings in the pluggalbe project's T4 (maybe using portable areas?) or would I have to modify the actual T4 code?
Any help would be greatly appreciated, thanks!
Coordinator
Oct 11, 2013 at 5:19 PM
Right now, I don't think this is configurable, though it might make sense to add a knob for it. For now, try making a manual change to the .tt file to see if that does what you want.

Look for this code around line 1164:
    // Make a virtual path from the physical path
    return "~/" + fileFullPath.Substring(AppRoot.Length).Replace('\\', '/');
And change "~/" to "~/Areas/Payroll/"