Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > t4 template code appending
 

t4 template code appending

Hi

I have a file generated from a t4 template file. I also have another t4 template file, nowthe code generated fromthisshould be appended to the first file only, I does wantanew fileto be generated.

How do i do this? well using Microsoft.Practices.RecipeFramework.Extensions.dll will work for me.if so whatclass should I use in that.

If this is not the solution is there any way of doingthat.

Please help me

Regards

satish kumar P

satish padidem  Wednesday, January 09, 2008 9:47 AM
Hi Satish, if you trying to add code to the existing class created with the first template you could use partial classes and create another file with the second template extending the first class using this mechanism.

If you must add the output of the second template to the first file you should be able to use the output of the transformation (the string value) and manipulate the first created file using FileCodeModel or any other file manipulation API.

HTH,
-Adrian
Adrian Alonso  Wednesday, January 09, 2008 12:11 PM
Hi Satish, if you trying to add code to the existing class created with the first template you could use partial classes and create another file with the second template extending the first class using this mechanism.

If you must add the output of the second template to the first file you should be able to use the output of the transformation (the string value) and manipulate the first created file using FileCodeModel or any other file manipulation API.

HTH,
-Adrian
Adrian Alonso  Wednesday, January 09, 2008 12:11 PM

You can use google to search for other answers

Custom Search

More Threads

• Retreiving project for an unbound recipe
• Boolean Condition Doesn´t Work
• Windows Test Technology
• Guidance Automation and TFS
• Package works when manually registered but not using msi
• SCSF April 2008 - WPF Resource Dictionary implementation
• Argument of ValueProvider is only Replaced if I put it on the WizardForm
• Can't register guidance packages with Feb '07 GAX and GAT
• Minor bug in VszWizard.FindAddItem
• Problems installing SCSF source code may 2007