<?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: Understanding T4: &#60;#@ include #&#62; directive</title>
	<link>http://www.olegsych.com/2008/02/t4-include-directive/</link>
	<description>Me.Write(code)</description>
	<pubDate>Sat, 13 Mar 2010 13:47:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Prasad</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-2160</link>
		<dc:creator>Prasad</dc:creator>
		<pubDate>Wed, 26 Aug 2009 04:36:21 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-2160</guid>
		<description>Hi,
We want tot execute a t4 template file through our custom host. We can execute it if and only the Main.tt file doesnot includes any other .tt file in the include directives.

The Same file we can perform successfully through Visual studio.

Our code for custom host is as below:

            CustomCmdLineHost host = new CustomCmdLineHost();
            Engine engine = new Engine();
            //Transform the text template.
            string output = engine.ProcessTemplate(input, host);

It always gives the error as Loading the include file 'D:\IncludedFile.tt' returned a null or empty string.

As per the MSDN this error comes if the included file is empty, however its not.
http://msdn.microsoft.com/en-us/library/bb126242.aspx

Please suggest.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
We want tot execute a t4 template file through our custom host. We can execute it if and only the Main.tt file doesnot includes any other .tt file in the include directives.</p>
<p>The Same file we can perform successfully through Visual studio.</p>
<p>Our code for custom host is as below:</p>
<p>            CustomCmdLineHost host = new CustomCmdLineHost();<br />
            Engine engine = new Engine();<br />
            //Transform the text template.<br />
            string output = engine.ProcessTemplate(input, host);</p>
<p>It always gives the error as Loading the include file &#8216;D:\IncludedFile.tt&#8217; returned a null or empty string.</p>
<p>As per the MSDN this error comes if the included file is empty, however its not.<br />
<a href="http://msdn.microsoft.com/en-us/library/bb126242.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb126242.aspx</a></p>
<p>Please suggest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1336</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Mon, 25 May 2009 15:06:36 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1336</guid>
		<description>Hugo, I created work item &lt;a href="http://t4toolbox.codeplex.com/WorkItem/View.aspx?WorkItemId=13146" rel="nofollow"&gt;13146&lt;/a&gt; for this problem and can fix it in the next release of T4 Toolbox in a couple of months.</description>
		<content:encoded><![CDATA[<p>Hugo, I created work item <a href="http://t4toolbox.codeplex.com/WorkItem/View.aspx?WorkItemId=13146" rel="nofollow">13146</a> for this problem and can fix it in the next release of T4 Toolbox in a couple of months.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hugo</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1335</link>
		<dc:creator>hugo</dc:creator>
		<pubDate>Mon, 25 May 2009 14:50:33 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1335</guid>
		<description>Any new comments on this subject? Is the problem fixed yet?

Kind regards ^_^</description>
		<content:encoded><![CDATA[<p>Any new comments on this subject? Is the problem fixed yet?</p>
<p>Kind regards ^_^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hugo</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1289</link>
		<dc:creator>hugo</dc:creator>
		<pubDate>Mon, 04 May 2009 14:26:27 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1289</guid>
		<description>Cool, thanks !
Could you maybe do me a favor, and email me if the new version is available.

Anyway, Thank you very much for your speedy replies!</description>
		<content:encoded><![CDATA[<p>Cool, thanks !<br />
Could you maybe do me a favor, and email me if the new version is available.</p>
<p>Anyway, Thank you very much for your speedy replies!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1276</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Thu, 30 Apr 2009 10:16:50 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1276</guid>
		<description>It turns out, this is something I overlooked in T4Toolbox. I'll write it up as a bug on CodePlex. Thanks for pointing it out.</description>
		<content:encoded><![CDATA[<p>It turns out, this is something I overlooked in T4Toolbox. I&#8217;ll write it up as a bug on CodePlex. Thanks for pointing it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hugo</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1275</link>
		<dc:creator>hugo</dc:creator>
		<pubDate>Thu, 30 Apr 2009 06:55:50 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1275</guid>
		<description>Yes ... It does. But for some reason if it's in a folder, it doesn't.</description>
		<content:encoded><![CDATA[<p>Yes &#8230; It does. But for some reason if it&#8217;s in a folder, it doesn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1268</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Wed, 29 Apr 2009 11:26:46 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1268</guid>
		<description>Hugo, does it work when the project is directly in the solution and not in a sub-folder?</description>
		<content:encoded><![CDATA[<p>Hugo, does it work when the project is directly in the solution and not in a sub-folder?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hugo</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1266</link>
		<dc:creator>hugo</dc:creator>
		<pubDate>Wed, 29 Apr 2009 11:07:35 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-1266</guid>
		<description>Hi, I have a small problem with using the AzMan.tt Template.
My solution is as follows:
- Solution
 -&#62; Folder
   &#124;-&#62; AzManProject
     &#124;-&#62;AuthorizationStore.tt

Then I get the error:
The project C:\xxx\xx.csproj does not belong to the solution.

I'm geussing this is due to the fact that it can't find:


Or, maybe something else ....
Any help would be appreciated

I can email someone a sample project, if they require more info.</description>
		<content:encoded><![CDATA[<p>Hi, I have a small problem with using the AzMan.tt Template.<br />
My solution is as follows:<br />
- Solution<br />
 -&gt; Folder<br />
   |-&gt; AzManProject<br />
     |-&gt;AuthorizationStore.tt</p>
<p>Then I get the error:<br />
The project C:\xxx\xx.csproj does not belong to the solution.</p>
<p>I&#8217;m geussing this is due to the fact that it can&#8217;t find:</p>
<p>Or, maybe something else &#8230;.<br />
Any help would be appreciated</p>
<p>I can email someone a sample project, if they require more info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-819</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Sun, 23 Nov 2008 14:19:09 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-819</guid>
		<description>Mike, I don't think it's possible for a directive processor generate code in the TransformText method. Take a look at virtual methods of the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.directiveprocessor.aspx" rel="nofollow"&gt;DirectoveProcessor&lt;/a&gt; class. If I understand correclty, a directive processor can provide class-level code and code for the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.texttransformation.initialize.aspx" rel="nofollow"&gt;Initialize&lt;/a&gt; method of GeneratedTextTransformation.</description>
		<content:encoded><![CDATA[<p>Mike, I don&#8217;t think it&#8217;s possible for a directive processor generate code in the TransformText method. Take a look at virtual methods of the <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.directiveprocessor.aspx" rel="nofollow">DirectoveProcessor</a> class. If I understand correclty, a directive processor can provide class-level code and code for the <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.texttransformation.initialize.aspx" rel="nofollow">Initialize</a> method of GeneratedTextTransformation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Pagel</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-808</link>
		<dc:creator>Mike Pagel</dc:creator>
		<pubDate>Thu, 20 Nov 2008 17:09:07 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-808</guid>
		<description>Just notice that in comment #2 your CM system removed the T4 statements. They looked like this


and


That should work.

Sorry about that,
Mike</description>
		<content:encoded><![CDATA[<p>Just notice that in comment #2 your CM system removed the T4 statements. They looked like this</p>
<p>and</p>
<p>That should work.</p>
<p>Sorry about that,<br />
Mike</p>
]]></content:encoded>
	</item>
</channel>
</rss>
