<?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: How to generate multiple outputs from single T4 template</title>
	<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/</link>
	<description>this.Write(code);</description>
	<pubDate>Tue, 18 Nov 2008 15:19:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: derek wilson&#187; Blog Archive &#187; SQLite foreign key constraint generator using T4</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-743</link>
		<dc:creator>derek wilson&#187; Blog Archive &#187; SQLite foreign key constraint generator using T4</dc:creator>
		<pubDate>Mon, 10 Nov 2008 19:53:12 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-743</guid>
		<description>[...] In this instance we generate all the SQL into one file, if we wanted to we could easily generate each constraint into its own file, Oleg Sych has an example of how to do this. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] In this instance we generate all the SQL into one file, if we wanted to we could easily generate each constraint into its own file, Oleg Sych has an example of how to do this. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miguel Ajho</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-725</link>
		<dc:creator>Miguel Ajho</dc:creator>
		<pubDate>Wed, 05 Nov 2008 18:12:50 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-725</guid>
		<description>One thing I found while trying this out. Could be usefull to anyone using foreighn characters, on the lines with File.WriteAllText(), it is usefull to add the encoding parameter at the end, so that the accent marks and other characters can apear correctly. In my case, I was generating aspx files, and all though the text output from the transformation was correct, the rendered output on the browser wasn't. Adding System.Text.Encoding.UTF-8 at the end of the parameter list on the WriteAllText resolved the problem.

Thanks for this great article, which helpes ALOT!!!</description>
		<content:encoded><![CDATA[<p>One thing I found while trying this out. Could be usefull to anyone using foreighn characters, on the lines with File.WriteAllText(), it is usefull to add the encoding parameter at the end, so that the accent marks and other characters can apear correctly. In my case, I was generating aspx files, and all though the text output from the transformation was correct, the rendered output on the browser wasn&#8217;t. Adding System.Text.Encoding.UTF-8 at the end of the parameter list on the WriteAllText resolved the problem.</p>
<p>Thanks for this great article, which helpes ALOT!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-386</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Sun, 10 Aug 2008 14:22:00 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-386</guid>
		<description>It's hard to tell without knowing how you adapted the code to run in a console program. If you implemented a custom host, it may not be resolving assembly references properly.</description>
		<content:encoded><![CDATA[<p>It&#8217;s hard to tell without knowing how you adapted the code to run in a console program. If you implemented a custom host, it may not be resolving assembly references properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Agustín</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-384</link>
		<dc:creator>Agustín</dc:creator>
		<pubDate>Sat, 09 Aug 2008 19:03:37 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-384</guid>
		<description>I have a question now, regarding the topic you mention here. I tried to "take outside" the ProcessTemplate procedure, right into a C# console program. When I process a template, an error CS0006: Could not find metafile "System.XML" (I´m using XML inside the template I´m trying to process)... any idea why is that?
Greetings</description>
		<content:encoded><![CDATA[<p>I have a question now, regarding the topic you mention here. I tried to &#8220;take outside&#8221; the ProcessTemplate procedure, right into a C# console program. When I process a template, an error CS0006: Could not find metafile &#8220;System.XML&#8221; (I´m using XML inside the template I´m trying to process)&#8230; any idea why is that?<br />
Greetings</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Agustín</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-380</link>
		<dc:creator>Agustín</dc:creator>
		<pubDate>Fri, 08 Aug 2008 13:03:54 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-380</guid>
		<description>Well, as a partner of mine said "I've seen light!". The article is great as a very handful example of running code for text-based template code generation, and helps me a lot in order to understand the concept.
I repeat, excellent work!!!</description>
		<content:encoded><![CDATA[<p>Well, as a partner of mine said &#8220;I&#8217;ve seen light!&#8221;. The article is great as a very handful example of running code for text-based template code generation, and helps me a lot in order to understand the concept.<br />
I repeat, excellent work!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugo Ribeiro : DSL Tools #8 - Multiple Outputs from Single Text Template</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-226</link>
		<dc:creator>Hugo Ribeiro : DSL Tools #8 - Multiple Outputs from Single Text Template</dc:creator>
		<pubDate>Fri, 20 Jun 2008 16:20:31 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-226</guid>
		<description>[...] How to generate multiple outputs from single T4 template [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] How to generate multiple outputs from single T4 template [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Coyne</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-205</link>
		<dc:creator>Jason Coyne</dc:creator>
		<pubDate>Thu, 29 May 2008 15:10:02 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-205</guid>
		<description>My error occurs when trying to compile the text generation class.  the "using" statement at the top of the file that references my DSL assembly is the culprit. Note, that this is the generated class for the "included" template that fails, not the outer "multi template" template.

If I generate the "included" template directly, it works fine. It seems like the DSL assembly is not in scope or passed into the context of the inner compilation engine.

As for removing the template directive, that does not work, as then the multiOutput.tt does not compile, because "host" is not defined.

Ill take a look at the nested template class.</description>
		<content:encoded><![CDATA[<p>My error occurs when trying to compile the text generation class.  the &#8220;using&#8221; statement at the top of the file that references my DSL assembly is the culprit. Note, that this is the generated class for the &#8220;included&#8221; template that fails, not the outer &#8220;multi template&#8221; template.</p>
<p>If I generate the &#8220;included&#8221; template directly, it works fine. It seems like the DSL assembly is not in scope or passed into the context of the inner compilation engine.</p>
<p>As for removing the template directive, that does not work, as then the multiOutput.tt does not compile, because &#8220;host&#8221; is not defined.</p>
<p>Ill take a look at the nested template class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-204</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Thu, 29 May 2008 11:42:56 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-204</guid>
		<description>Jason, let me try to answer your questions. 

1) I wrote this code for templates that don't require DSLs, which is why the template directive in MultiOutput.tt doesn't have the inherits parameter. Perhaps it would be best to remove the template directive from MultiOutput.tt altogether and rely on the including template to provide the hostspecific parameter it expects.

2) Perhaps encapsulating your templates using the &lt;a href="http://www.olegsych.com/2008/04/t4-template-design-nested-template-class" rel="nofollow"&gt;Nested Template Class&lt;/a&gt; technique would help to overcome this.

3) It's hard for me to tell what this problem may be. Does the error occur when T4 is trying to compile the template or when it is actually running the GeneratedTextTransformation?</description>
		<content:encoded><![CDATA[<p>Jason, let me try to answer your questions. </p>
<p>1) I wrote this code for templates that don&#8217;t require DSLs, which is why the template directive in MultiOutput.tt doesn&#8217;t have the inherits parameter. Perhaps it would be best to remove the template directive from MultiOutput.tt altogether and rely on the including template to provide the hostspecific parameter it expects.</p>
<p>2) Perhaps encapsulating your templates using the <a href="http://www.olegsych.com/2008/04/t4-template-design-nested-template-class" rel="nofollow">Nested Template Class</a> technique would help to overcome this.</p>
<p>3) It&#8217;s hard for me to tell what this problem may be. Does the error occur when T4 is trying to compile the template or when it is actually running the GeneratedTextTransformation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Coyne</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-203</link>
		<dc:creator>Jason Coyne</dc:creator>
		<pubDate>Wed, 28 May 2008 20:02:35 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-203</guid>
		<description>I am using the utility templates you attached, and they look very promising, but I am getting some errors using vs2005.

1) In the MultiInput.tt @Template directive, I think you need the standard "inherits" parameter. I get a bunch of errors without this.

2) SaveOutput() seems to work, but won't work in my situation, due to some of the constraints I have on the templates I wish to combine (duplicate variable names etc)

3) ProcessTemplate seems perfect, but doesn't work. I get an error in the generated text transformation class, saying that my DSL assembly cannot be found (in the using statement of the text generation class). If I just call my sub-template directly, it works fine, but when using the template in a combined fashion, it cannot resolve.   Help?</description>
		<content:encoded><![CDATA[<p>I am using the utility templates you attached, and they look very promising, but I am getting some errors using vs2005.</p>
<p>1) In the MultiInput.tt @Template directive, I think you need the standard &#8220;inherits&#8221; parameter. I get a bunch of errors without this.</p>
<p>2) SaveOutput() seems to work, but won&#8217;t work in my situation, due to some of the constraints I have on the templates I wish to combine (duplicate variable names etc)</p>
<p>3) ProcessTemplate seems perfect, but doesn&#8217;t work. I get an error in the generated text transformation class, saying that my DSL assembly cannot be found (in the using statement of the text generation class). If I just call my sub-template directly, it works fine, but when using the template in a combined fashion, it cannot resolve.   Help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-117</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Tue, 08 Apr 2008 01:06:27 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/03/how-to-generate-multiple-outputs-from-single-t4-template/#comment-117</guid>
		<description>It is hard to say without looking at the code. What type of object are you trying to pass as a parameter? 

Does changing the code from using CallContext GetData/SetData methods to LogicalGetData/LogicalSetData solve the problem?</description>
		<content:encoded><![CDATA[<p>It is hard to say without looking at the code. What type of object are you trying to pass as a parameter? </p>
<p>Does changing the code from using CallContext GetData/SetData methods to LogicalGetData/LogicalSetData solve the problem?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
