Export to GitHub

sharp-architecture - issue #87

Latest T4 Toolbox is incompatible with CRUD scaffolding


Posted on Mar 31, 2009 by Helpful Camel

See discussion at http://groups.google.com/group/sharp- architecture/browse_thread/thread/f8549caffc34248b?hl=en

Comment #1

Posted on Apr 6, 2009 by Grumpy Camel

I modified ScaffoldingGenerator.tt to work with the latest version of T4 Toolbox (9.3.21.2 from March 26). A patch file with the changes and the complete changed file are attached to this comment. Thanks to the latest changes by Oleg Sych, opening and closing the solution doesn't seem to be necessary any more.

I have not tested my changes thoroughly, but the generator creates everything fine for me (domain object + tests, controller + tests, views). Any feedback appreciated.

Attachments

Comment #2

Posted on Apr 29, 2009 by Grumpy Rhino

I think you should change the line 45 to: string targetPathRoot = applicationRootPath + solutionName + ".Web\Views\"; Otherwise the files will also be created in the main solution directory.

Comment #3

Posted on May 16, 2009 by Grumpy Dog

I don't know whether it's a problem with my setup but I now notice that the core and test files are generated in the root of their respective projects and not in the namespace subfolders that should be created. The views are created in their subfolders correctly however.

Comment #4

Posted on May 29, 2009 by Helpful Camel

Should we also look at http://tangibleengineering.blogspot.com/2009/05/tangible-t4- editor-14-support-for-mvc.html as a recommended editor?

Comment #5

Posted on Jun 16, 2009 by Grumpy Elephant

There is some problems with the namespacing, it doesn't create the folder hierarchy in some project. Line 91 should be something like:

RenderFileToProject(domainObjectTemplate, CreateDirectoriesAndAppendNamespacePathTo("") + fileName, outputProject);

Comment #6

Posted on Jul 1, 2009 by Helpful Camel

martik, your patch has been an IMMENSE time saver...thank you! I'm currently testing it out with the 9.5 build of T4 Toolbox and am making a few tweaks to handle namespaces and such. Thank you very much for the assistance!

Comment #7

Posted on Jul 15, 2009 by Helpful Camel

I've fixed this locally to support namespaces and will have it included in the next check-in (which should be 1.0 RTM).

Status: Fixed

Labels:
Type-Defect Priority-Medium