<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: T4 Tutorial: Creating reusable code generation templates</title>
	<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/</link>
	<description>Me.Write(code)</description>
	<pubDate>Sun, 14 Mar 2010 18:19:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2407</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Tue, 03 Nov 2009 14:19:35 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2407</guid>
		<description>Updated the article and the sample source code to work with the latest version of T4 Toolbox (replaced RenderCore with TransformText).</description>
		<content:encoded><![CDATA[<p>Updated the article and the sample source code to work with the latest version of T4 Toolbox (replaced RenderCore with TransformText).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2323</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Sat, 10 Oct 2009 17:29:53 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2323</guid>
		<description>T4Toolbox.tt no longer has the &lt;#@ assembly name=T4Toolbox" #&gt; directive because the assembly name is different under Visual Studio 2010. It is now referenced dynamically, by one of the directive processors. More on this &lt;a href="http://www.olegsych.com/2009/10/t4-toolbox-support-for-visual-studio-2010/" rel="nofollow"&gt;here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>T4Toolbox.tt no longer has the < #@ assembly name=T4Toolbox" #> directive because the assembly name is different under Visual Studio 2010. It is now referenced dynamically, by one of the directive processors. More on this <a href="http://www.olegsych.com/2009/10/t4-toolbox-support-for-visual-studio-2010/" rel="nofollow">here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nelis</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2316</link>
		<dc:creator>Nelis</dc:creator>
		<pubDate>Fri, 09 Oct 2009 06:49:46 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2316</guid>
		<description>I'm trying to figure out how the template knows where to find the namespace T4Toolbox as there is no assembly directive for it in T4Toolbox.tt.
Is it not needed because of the declared processors?</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to figure out how the template knows where to find the namespace T4Toolbox as there is no assembly directive for it in T4Toolbox.tt.<br />
Is it not needed because of the declared processors?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2159</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Tue, 25 Aug 2009 18:13:27 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2159</guid>
		<description>Darren,

It sounds like your code looks like this:

&lt;pre&gt;void LoadTables()
{
   // ...
}

public class MultifileControllerTest
{
    void TestLoadTables()
    {
        LoadTables();
    }
}&lt;/pre&gt;

The problem here is that LoadTables is an instance method of the &lt;a href="http://www.olegsych.com/2008/05/t4-architecture/" rel="nofollow"&gt;GeneratedTextTransformation&lt;/a&gt; class. With &lt;a href="http://t4toolbox.codeplex.com" rel="nofollow"&gt;T4 Toolbox&lt;/a&gt; you could call it this way:

TransformationContext.Transformation.LoadTables();</description>
		<content:encoded><![CDATA[<p>Darren,</p>
<p>It sounds like your code looks like this:</p>
<pre>void LoadTables()
{
   // ...
}

public class MultifileControllerTest
{
    void TestLoadTables()
    {
        LoadTables();
    }
}</pre>
<p>The problem here is that LoadTables is an instance method of the <a href="http://www.olegsych.com/2008/05/t4-architecture/" rel="nofollow">GeneratedTextTransformation</a> class. With <a href="http://t4toolbox.codeplex.com" rel="nofollow">T4 Toolbox</a> you could call it this way:</p>
<p>TransformationContext.Transformation.LoadTables();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2157</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Tue, 25 Aug 2009 17:02:02 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-2157</guid>
		<description>I am new to T4 templates and I'm having a problem with scope.

I'm including a file in my generator which declares a method called LoadTables()

When I try to use the method in my controller I get the following error.

"Cannot access a non-static member of outer type 'Microsoft.VisualStudio.TextTemplatingE192B65E6CF2C8BEF26D39CB464DA901.GeneratedTextTransformation' via nested type 'Microsoft.VisualStudio.TextTemplatingE192B65E6CF2C8BEF26D39CB464DA901.GeneratedTextTransformation.MultifileControllerTest'"

Is there any way to declare and use this method within the scope of MultifileControllerTest without bringing in the code?

Thanks for your help.</description>
		<content:encoded><![CDATA[<p>I am new to T4 templates and I&#8217;m having a problem with scope.</p>
<p>I&#8217;m including a file in my generator which declares a method called LoadTables()</p>
<p>When I try to use the method in my controller I get the following error.</p>
<p>&#8220;Cannot access a non-static member of outer type &#8216;Microsoft.VisualStudio.TextTemplatingE192B65E6CF2C8BEF26D39CB464DA901.GeneratedTextTransformation&#8217; via nested type &#8216;Microsoft.VisualStudio.TextTemplatingE192B65E6CF2C8BEF26D39CB464DA901.GeneratedTextTransformation.MultifileControllerTest&#8217;&#8221;</p>
<p>Is there any way to declare and use this method within the scope of MultifileControllerTest without bringing in the code?</p>
<p>Thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Visual Studio T4 template for SharePoint Feature Definition (Feature.xml) - Waldek Mastykarz</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1992</link>
		<dc:creator>Visual Studio T4 template for SharePoint Feature Definition (Feature.xml) - Waldek Mastykarz</dc:creator>
		<pubDate>Sun, 16 Aug 2009 11:10:16 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1992</guid>
		<description>[...] Depending on the type of SharePoint solutions you’re working with, you could easily extend the template to generate the ElementManifest elements as well and to exclude some files and directories from the Feature. All you have to know is the basic syntax of T4 templates. Oleg Sych did a great job of explaining the T4 engine from the very basic topics to some more advanced scenarios of how to reuse the templates across different projects and teams. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Depending on the type of SharePoint solutions you’re working with, you could easily extend the template to generate the ElementManifest elements as well and to exclude some files and directories from the Feature. All you have to know is the basic syntax of T4 templates. Oleg Sych did a great job of explaining the T4 engine from the very basic topics to some more advanced scenarios of how to reuse the templates across different projects and teams. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Kamoski</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1870</link>
		<dc:creator>Mark Kamoski</dc:creator>
		<pubDate>Wed, 05 Aug 2009 12:33:10 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1870</guid>
		<description>Google and Bing, here is some text for you to index, text that is easily OCR'able in the image above but that is a trick you have not learned yet apparently...

Error 1 Compiling transformation: The type or namespace name 'Template' could not be found (are you missing a using directive or an assembly reference?) c:\Code\Team\Cle\Cle.BusinessLayer\BusinessEntities\Generator1.tt 6 27

...so...

HTH.

Thank you.

-- Mark Kamoski</description>
		<content:encoded><![CDATA[<p>Google and Bing, here is some text for you to index, text that is easily OCR&#8217;able in the image above but that is a trick you have not learned yet apparently&#8230;</p>
<p>Error 1 Compiling transformation: The type or namespace name &#8216;Template&#8217; could not be found (are you missing a using directive or an assembly reference?) c:\Code\Team\Cle\Cle.BusinessLayer\BusinessEntities\Generator1.tt 6 27</p>
<p>&#8230;so&#8230;</p>
<p>HTH.</p>
<p>Thank you.</p>
<p>&#8211; Mark Kamoski</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1265</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Wed, 29 Apr 2009 11:06:39 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1265</guid>
		<description>Rick, Template class is defined in T4Toolbox\Template.tt, which is installed under Program Files directory by the T4Toolbox installer.</description>
		<content:encoded><![CDATA[<p>Rick, Template class is defined in T4Toolbox\Template.tt, which is installed under Program Files directory by the T4Toolbox installer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1261</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Tue, 28 Apr 2009 23:04:22 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1261</guid>
		<description>I also get that error on the download above. This occurs for every Push* Pop* and Write* method. Perhaps I am missing something? Where is the class Template defined from which DeleteProcedureTemplate inherits?</description>
		<content:encoded><![CDATA[<p>I also get that error on the download above. This occurs for every Push* Pop* and Write* method. Perhaps I am missing something? Where is the class Template defined from which DeleteProcedureTemplate inherits?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1260</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Tue, 28 Apr 2009 22:47:20 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/#comment-1260</guid>
		<description>When I copy the DeleteProcedure Template code into my template I get:

Error	1	Cannot access a non-static member of outer type 'Ae9310d1e44874327b8e5dd2ae3c645b5.GeneratedTextTransformation' via nested type 'Ae9310d1e44874327b8e5dd2ae3c645b5.GeneratedTextTransformation.DeleteProcedureTemplate'	C:\rick\dev\hydrogen\src\Hydrogen.Common.Entity\Edmx\Generators\DeleteProcedureTemplate.tt	19	9	Hydrogen.Common.Entity</description>
		<content:encoded><![CDATA[<p>When I copy the DeleteProcedure Template code into my template I get:</p>
<p>Error	1	Cannot access a non-static member of outer type &#8216;Ae9310d1e44874327b8e5dd2ae3c645b5.GeneratedTextTransformation&#8217; via nested type &#8216;Ae9310d1e44874327b8e5dd2ae3c645b5.GeneratedTextTransformation.DeleteProcedureTemplate&#8217;	C:\rick\dev\hydrogen\src\Hydrogen.Common.Entity\Edmx\Generators\DeleteProcedureTemplate.tt	19	9	Hydrogen.Common.Entity</p>
]]></content:encoded>
	</item>
</channel>
</rss>
