Wednesday 15 August 2012

c# - visual studo item template with wizard and T4 -



c# - visual studo item template with wizard and T4 -

i looking sample on how create item template wizard in visual studio 2012.

i need wizard mvc controller.

when user selects add together item, want show dialog user enters input parameters, including class in solution.

then on pressing ok generate form (including designer , resx) want add together project.

currently have t4 files , programme this, using external tools (texttransform.exe), copying files in folder of solution , manipulating csproj file manually.

// set text transform programme (this alter according windows version) p.startinfo.filename = "c:\\program files (x86)\\common files\\microsoft shared\\texttemplating\\11.0\\texttransform.exe"; // specify t4 template file p.startinfo.arguments = "-out " + "\"" + output + "\"" + " \"" + template + "\""; //manipulating csproj var formnode = new xelement(@"{http://schemas.microsoft.com/developer/msbuild/2003}compile", new xattribute("include", frompath)); formnode.add(new xelement(@"{http://schemas.microsoft.com/developer/msbuild/2003}subtype", "form")); programnode.addbeforeself(formnode);

c# visual-studio templates visual-studio-2012 t4

No comments:

Post a Comment