<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>T4 Templates</title>
        <link>http://geekswithblogs.net/jescrich/category/6661.aspx</link>
        <description>Text Transformation Templates</description>
        <language>en-US</language>
        <copyright>Jose Escrich</copyright>
        <managingEditor>jescrich@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Testing T4 templates using mock framework (MoQ)</title>
            <link>http://geekswithblogs.net/jescrich/archive/2008/02/27/testing-t4-templates-using-mock-framework-moq.aspx</link>
            <description>&lt;p&gt;Some time ago I wrote a &lt;a href="http://weblogs.asp.net/jescrich/archive/2007/05.aspx" target="_blank"&gt;post in which I talk about how you can do unit tests over your text templates using the GAX Host&lt;/a&gt;. In that example I used a very simple template which receives just a couple of string properties. But it becomes more complicated when you have properties which are complex types ok I know, most probably you're thinking that can resolve that just creating your own mock objects and you're right. &lt;/p&gt;  &lt;p&gt;But the thing is that you can do that in a really easiest way using a mock framework. I will not speak here about &lt;a href="http://www.hanselman.com/blog/MoqLinqLambdasAndPredicatesAppliedToMockObjects.aspx" target="_blank"&gt;mock frameworks&lt;/a&gt; so you can find a lot of posts about it. I'll speak about &lt;a href="http://code.google.com/p/moq/" target="_blank"&gt;MoQ&lt;/a&gt; which is a new mock framework developed by &lt;a title="ClariuS" href="http://clariusconsulting.net" target="_blank"&gt;Clarius&lt;/a&gt; and other companies. You can know more about &lt;a href="http://code.google.com/p/moq/" target="_blank"&gt;MoQ&lt;/a&gt; in the &lt;a href="http://www.clariusconsulting.net/blogs/kzu/archive/2007/12/18/46465.aspx" target="_blank"&gt;Daniel's blog&lt;/a&gt; and in its &lt;a href="http://code.google.com/p/moq/" target="_blank"&gt;Google code page&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;In the following example what I did was create a simple text template which uses an IEntitySchema object to create something like a Business Entity, so here we got an issue because we need an instance of that IEntitySchema and, the way to get it using the classic TDD approach, is creating an explicit Mock object. &lt;/p&gt;  &lt;p&gt;So here is when MoQ comes to the rescue, if you see the code snippet it has a call to new Mock&amp;lt;IEntitySchema&amp;gt;() which will creates a proxy of an IEntitySchema implementation. After that, I defined our expectations for each interface signature in where we want to test an interaction.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/dbd54a048c0f_F0F4/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="403" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/dbd54a048c0f_F0F4/image_thumb_2.png" width="592" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/dbd54a048c0f_F0F4/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="431" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/dbd54a048c0f_F0F4/image_thumb_3.png" width="627" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So, at that point we're ready to perform the tests and make all the assertions, plus the really interesting thing, which is the verification of all our expectations. That basically means that, beside make the assertions over states, now we can check if some interactions was made or not (in other words if some method or some property in the interface has been called or not and if was called with certain parameters values and types or not). &lt;/p&gt;  &lt;p&gt;I think that the test interactions are a really interesting thing to include in our classic Todd fixtures.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.latincoder.com/samples/T4FixtureSample.rar" target="_blank"&gt;Download Sample Code&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120025"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120025" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/jescrich/aggbug/120025.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jose Escrich</dc:creator>
            <guid>http://geekswithblogs.net/jescrich/archive/2008/02/27/testing-t4-templates-using-mock-framework-moq.aspx</guid>
            <pubDate>Thu, 28 Feb 2008 00:09:13 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/jescrich/comments/120025.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/jescrich/archive/2008/02/27/testing-t4-templates-using-mock-framework-moq.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/jescrich/comments/commentRss/120025.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/jescrich/services/trackbacks/120025.aspx</trackback:ping>
        </item>
        <item>
            <title>New T4 Template Visual Studio Editor.</title>
            <link>http://geekswithblogs.net/jescrich/archive/2007/06/07/New-T4-Template-Visual-Studio-Editor.aspx</link>
            <description>&lt;p&gt;During this past month I've been working in a new T4 template editor as a part of the &lt;a title="Software Factories Toolkit" href="http://softwarefactoriestoolkit.net/" target="_blank"&gt;&lt;strong&gt;SFT&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;If you're working with dsl or gax you already know, how the editor looks when you try to edit a text template file, it looks like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/image.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="340" alt="image" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/image_thumb.png" width="402" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;So now you can have a fully colorized text editor for your T4 templates like the ASP.NET Vs editor and you can get it now downlaoding the &lt;a href="http://softwarefactoriestoolkit.net/" target="_blank"&gt;&lt;strong&gt;ClariuS Software Factories Toolkit here&lt;/strong&gt;.&lt;/a&gt;&lt;br /&gt; &lt;p&gt;&lt;strong&gt;Colorizing, Intellisense and Validation&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In this release it's providing colorizing and intellisense for the T4 statements, like directives, class features and blocks. Regarding the directives you have intellisense for all well known directives and its properties and values. &lt;/p&gt; &lt;p&gt;&lt;br /&gt; &lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editor.gif" atomicselection="true"&gt;&lt;img height="420" alt="t4editor" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editor_thumb.gif" width="628" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;One interesting feature is for those the well known properties which represents a type, the intellisense gives a complete list of the current project types including its references. &lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editorintellisense00.gif" atomicselection="true"&gt;&lt;img height="177" alt="t4editorintellisense00" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editorintellisense00_thumb.gif" width="627" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Validation&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Like the ASP.NET editor you have a real time document validation.&lt;/p&gt; &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editorvalidation_2.gif" atomicselection="true"&gt;&lt;img height="304" alt="Validation" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editorvalidation_thumb_2.gif" width="747" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Preview Transformation&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;One useful feature is the possibility to run a template transformation in design time, basically as you know, there are two common contexts to run t4 templates, that's a DSLTools Host and GAX Host. When you use the GAX host, most probably you use properties, so you can specify those properties values through the editor property window. &lt;/p&gt; &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editorproperties.gif" atomicselection="true"&gt;&lt;img height="482" alt="t4editorproperties" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4editorproperties_thumb.gif" width="726" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;If you want to use complex types you can specify in the property declaration an UITypeEditor and a TypeConverter if it's needed.&lt;/p&gt; &lt;p&gt;&lt;a href="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4typeeditor.gif" atomicselection="true"&gt;&lt;img height="289" alt="t4typeeditor" src="http://geekswithblogs.net/images/geekswithblogs_net/jescrich/WindowsLiveWriter/T4TemplateEditor_EEB1/t4typeeditor_thumb.gif" width="370" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;So to run the transformation you just have to specify some values for the properties and run the preview transformation commands, which is located at top of solution explorer or in the editor context menu. After running the transformation you get a temp file with the output. If you've specified the ouput extension directive the temp file will have that extension, that's useful so that so to instantiate the proper Vs editor for that output file.  &lt;/p&gt;&lt;p&gt;The transformation could fail for different reasons, if the transformation fails when the template is compiled you'll get those errors into visual studio error list, however if the transformation fails after the compilation and when the template is running you'll get the errors in a temp output file.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Debugging&lt;/strong&gt;  &lt;/p&gt;&lt;p&gt;Unfortunately, in this version the editor does not have debug yet, however in the meantime you can check the &lt;a title="How to Debug Text Templates" href="http://blogs.msdn.com/garethj/archive/2006/01/09/t4debugging.aspx" target="_blank"&gt;Garethj's Blog&lt;/a&gt;, there he has a post of how you can debug a template. I hope we could include this feature on future versions.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;What's coming&lt;/strong&gt;  &lt;/p&gt;&lt;p&gt;We're working in one important feature which is supporting intellisense and colorizing for the embedded language like you already have in the ASP.NET editor.  &lt;/p&gt;&lt;p&gt;&lt;br /&gt;You can try it now, &lt;a href="http://softwarefactoriestoolkit.net/" target="_blank"&gt;download the &lt;strong&gt;Clarius Software Factories Toolkit from here.&lt;/strong&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;Enjoy.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113074"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113074" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/jescrich/aggbug/113074.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jose Escrich</dc:creator>
            <guid>http://geekswithblogs.net/jescrich/archive/2007/06/07/New-T4-Template-Visual-Studio-Editor.aspx</guid>
            <pubDate>Thu, 07 Jun 2007 16:31:18 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/jescrich/comments/113074.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/jescrich/archive/2007/06/07/New-T4-Template-Visual-Studio-Editor.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/jescrich/comments/commentRss/113074.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/jescrich/services/trackbacks/113074.aspx</trackback:ping>
        </item>
        <item>
            <title>ClariuS Software Factories Toolkit June CTP is out!.</title>
            <link>http://geekswithblogs.net/jescrich/archive/2007/06/07/ClariuS-Software-Factories-Toolkit-June-CTP-is-out.aspx</link>
            <description>&lt;p&gt;&lt;a href="http://softwarefactoriestoolkit.net/" target="_blank"&gt;The Software Factories Toolkit June CTP&lt;/a&gt; is finally out and the key improvements in this release are:&lt;/p&gt; &lt;p&gt;- &lt;strong&gt;Recipe Designer&lt;/strong&gt; with a redesigned user experiencie and round tripping support, so it could uses the .xml recipe files as is.&lt;/p&gt; &lt;p&gt;- &lt;strong&gt;T4 Templates Editor&lt;/strong&gt;, an useful editor with colorizing, intellisense and support to preview transformation in design time.&lt;/p&gt; &lt;p&gt;- &lt;strong&gt;Multi package setup wizard&lt;/strong&gt;, a recipe which generate a wix setup project with all the package contained in a solution. The most interesting thing here, is that you don't have to create differente setup project for each of your package any more. Now you can create a unified wix project, which could contain two or more guidance package and dsl tools packages. &lt;a href="http://adrianalonso.blogspot.com/2007/06/sft-setup-project-deploying-many.html" target="_blank"&gt;&lt;strong&gt;Get more information about this new feature in the Adrian's Blog.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:68ca3574-7099-4839-bcae-a567a2249822" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Software%20Factories" rel="tag"&gt;Software Factories&lt;/a&gt;&lt;/div&gt; &lt;p&gt;- &lt;strong&gt;Dsl Recipe Binder&lt;/strong&gt;, now you can specify bindings to recipes just doing a right click on your dsl designer surface and choossing a reference where the recipes will apply.&lt;/p&gt; &lt;p&gt;You can check the &lt;a href="http://clariusconsulting.net/blogs/vga" target="_blank"&gt;Victor's blog&lt;/a&gt;, there you will find an overview of the new features included in this drop.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://softwarefactoriestoolkit.net/" target="_blank"&gt;&lt;u&gt;You can get the latest SFT version here.&lt;/u&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113072"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113072" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/jescrich/aggbug/113072.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jose Escrich</dc:creator>
            <guid>http://geekswithblogs.net/jescrich/archive/2007/06/07/ClariuS-Software-Factories-Toolkit-June-CTP-is-out.aspx</guid>
            <pubDate>Thu, 07 Jun 2007 16:28:28 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/jescrich/comments/113072.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/jescrich/archive/2007/06/07/ClariuS-Software-Factories-Toolkit-June-CTP-is-out.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/jescrich/comments/commentRss/113072.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/jescrich/services/trackbacks/113072.aspx</trackback:ping>
        </item>
        <item>
            <title>Testing T4 templates using the GAX host</title>
            <link>http://geekswithblogs.net/jescrich/archive/2007/05/03/Testing-T4-templates-using-the-GAX-host.aspx</link>
            <description>&lt;a href="http://latincoder.com/samples/t4samplepackage.rar" title="Download Sample Package"&gt;&lt;br /&gt;
Download Sample Package&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
I guess that there are not a best approach to do the tests without a built in support in the T4 template host. Nevertheless in the Web Service Software Factory we did a very first approach of how you could write test units for t4 templates.&lt;br /&gt;
&lt;br /&gt;
Suppose that we have a template which the output is a simple class, in the following example I did a simple package which contains a T4 template called Programs.cs.t4 so, the idea is, run the transformation and then try to compile the class to get its Type in order to make asserts using reflection.&lt;br /&gt;
&lt;br /&gt;
In the attached sample fixture it has an ExecuteTemplate helper method which has the logic to run the transformation and then try to compile it. &lt;span style="color: rgb(102, 102, 102);"&gt;(considering that the output is a .cs class, if not, it could return an XmlDocument in case that the transformation results in an xml file). &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;&lt;img vspace="0" hspace="0" border="0" align="middle" src="http://docs.google.com/File?id=ajdmzppnr3xn_3fkw2k9c4" style="height: 546px; width: 730px;" alt="" /&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
In the next picture you've the TestMethod which runs the transformation, gets the returned type and then perform different asserts over it.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;&lt;img align="middle" src="http://docs.google.com/File?id=ajdmzppnr3xn_5dwk3xzcx" style="height: 272px; width: 699px;" alt="" /&gt;&lt;br /&gt;
&lt;/div&gt;
Notice that you should have created a link to the T4 template file and set the *Copy to Output* property as "Copy if newer" as showing in the following image, this is an important thing because the TestMethod is marked with the DeploymentItemAttribute in order to have the t4 file in the test context. Also you have to reference the Microsoft.Practices.RecipeFramework.VisualStudio.Library and Microsoft.VisualStudio.TextTemplating assemblies which are located in the PublicAssemblies folder.&lt;br /&gt;
&lt;br /&gt;
&lt;img align="absmiddle" src="http://docs.google.com/File?id=ajdmzppnr3xn_7g7tnhmdc" style="height: 514px; width: 622px;" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://latincoder.com/samples/t4samplepackage.rar" title="Download Sample Package"&gt;Download Sample Package&lt;/a&gt; &lt;br /&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112218"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=112218" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/jescrich/aggbug/112218.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jose Escrich</dc:creator>
            <guid>http://geekswithblogs.net/jescrich/archive/2007/05/03/Testing-T4-templates-using-the-GAX-host.aspx</guid>
            <pubDate>Thu, 03 May 2007 20:56:20 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/jescrich/comments/112218.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/jescrich/archive/2007/05/03/Testing-T4-templates-using-the-GAX-host.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/jescrich/comments/commentRss/112218.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/jescrich/services/trackbacks/112218.aspx</trackback:ping>
        </item>
    </channel>
</rss>