1

Closed

T4MVC problem with javascript nested folders with same name

description

hi,
i recently dropped ckeditor into my mvc project. when i regenerated t4mvc it generated erroneous code:

Error 9 'templates': member names cannot be the same as their enclosing type D:\MyApp\Web\T4MVC.cs 896 41 MyApp.Web


Error 8 'styles': member names cannot be the same as their enclosing type D:\elevate\elevate-app\src\Elevate.Web.Contractors\T4MVC.cs 830 41 Elevate.Web.Contractors

[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
            public static class styles {
                private const string URLPATH = "~/Scripts/ckeditor/plugins/styles";
                public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
                public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
                [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
                public static class styles {
                    private const string URLPATH = "~/Scripts/ckeditor/plugins/styles/styles";
                    public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
                    public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
                    public static readonly string default_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/default.min.js") ? Url("default.min.js") : Url("default.js");

                }

            }

I've temporarily just renamed the subfolders but what's the best way forward with this???
Closed Jul 29, 2011 at 12:14 AM by davidebbo
Great, closing issue then.

comments

davidebbo wrote Jul 28, 2011 at 9:28 PM

Good find. I just fixed that in T4MVC 2.6.60. Please confirm that this works for you!

mickdelaney wrote Jul 28, 2011 at 11:43 PM

job done!!!!

great cheers.... :-)