<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>[Profoundly Esoteric Image]</title><link>http://blogs.msdn.com/b/garethj/</link><description>GarethJ&amp;#39;s WebLog -  Code generation and abstraction</description><dc:language>en-GB</dc:language><generator>Telligent Community (Build: 5.5.134.11459)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/GarethjsWeblog" /><feedburner:info uri="garethjsweblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>52.211</geo:lat><geo:long>0.091</geo:long><image><link>http://blogs.msdn.com/garethj</link><url>http://blogs.msdn.com/photos/garethj/images/secondarythumb/GarethJ.aspx</url><title>GarethJ</title></image><item><title>Maintenance-Free Mocking for Unit Testing with EntityFramework 4.0</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/MoSRBp_0BDA/maintenance-free-mocking-for-unit-testing-with-entityframework-4-0.aspx</link><pubDate>Sat, 21 Aug 2010 05:23:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10052707</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=10052707</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2010/08/21/maintenance-free-mocking-for-unit-testing-with-entityframework-4-0.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/b/garethj/archive/2010/08/21/maintenance-free-mocking-for-unit-testing-with-entityframework-4-0.aspx";digg_title = "Maintenance-Free Mocking for Unit Testing with EntityFramework 4.0";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://blogofrab.blogspot.com/" target="_blank"&gt;Rab Hallett&lt;/a&gt; has a nice &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/a850e686-df08-4245-b0bb-5872654285c9" target="_blank"&gt;tool in the VS Gallery&lt;/a&gt; that uses T4 templates to generate mocks for unit-testing EF-based applications&lt;/p&gt; &lt;p&gt;&lt;a title="Maintenance-Free Mocking for Unit Testing with EntityFramework 4.0" href="http://blogofrab.blogspot.com/2010/08/maintenance-free-mocking-for-unit.html"&gt;Maintenance-Free Mocking for Unit Testing with EntityFramework 4.0&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-36-85-metablogapi/7801.object_5F00_context_5F00_interface_5B00_1_5D005F00_2.png" target="_blank"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="object_context_interface[1]" border="0" alt="object_context_interface[1]" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-36-85-metablogapi/4744.object_5F00_context_5F00_interface_5B00_1_5D005F00_thumb.png" width="623" height="389" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e937551b-885e-407c-8df3-f7a4de746e84" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Entity+Framework" rel="tag"&gt;Entity Framework&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Unit+Testing" rel="tag"&gt;Unit Testing&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Mock+Objects" rel="tag"&gt;Mock Objects&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10052707" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=MoSRBp_0BDA:3If9JlfOxCg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2010/08/21/maintenance-free-mocking-for-unit-testing-with-entityframework-4-0.aspx</feedburner:origLink></item><item><title>Visualization and Modeling Feature Pack with T4 Code Generation</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/0afGfNjsX0k/visualization-and-modeling-feature-pack-with-t4-code-generation.aspx</link><pubDate>Tue, 08 Jun 2010 00:26:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10021305</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=10021305</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2010/06/08/visualization-and-modeling-feature-pack-with-t4-code-generation.aspx#comments</comments><description>&lt;p&gt;As &lt;a href="http://blogs.msdn.com/b/jasonz/archive/2010/06/07/announcing-vs2010-productivity-power-tools-and-modeling-feature-packs.aspx"&gt;Jason Zander&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/b/camerons/archive/2010/06/07/visualization-and-modeling-feature-pack-is-now-available.aspx"&gt;Cameron&lt;/a&gt; have announced, we've just released the first Feature Pack for Visual Studio 2010, the &lt;strong&gt;Visualization and Modeling Feature Pack.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This pack is available to all MSDN subscribers and among a host of other great features, adds T4-based code generation to our UML static class diagrams.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;img alt="UML class diagram and generated C# class files." src="http://i.msdn.microsoft.com/dynimg/IC402380.png" /&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;&lt;/p&gt; &lt;p&gt;This add-in works with the C# profile that we shipped with Visual Studio to generate code.&lt;/p&gt; &lt;p&gt;It's a great example of how you can rather easily build a profile yourself to add yet more metadata to your UML model and enrich the code generation further.&lt;/p&gt; &lt;p&gt;You can find all the detail on editing and customizing the templates here: &lt;a title="http://msdn.microsoft.com/library/ff657795.aspx" href="http://msdn.microsoft.com/library/ff657795.aspx"&gt;http://msdn.microsoft.com/library/ff657795.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Enjoy.&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:12cea08f-2bf0-4d74-a020-1bd45f872269" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/UML" rel="tag"&gt;UML&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Code+Generation" rel="tag"&gt;Code Generation&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10021305" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=0afGfNjsX0k:LJi71seY45Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Tech+thrills/">Tech thrills</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/UML/">UML</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Visual+Studio/">Visual Studio</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2010/06/08/visualization-and-modeling-feature-pack-with-t4-code-generation.aspx</feedburner:origLink></item><item><title>What's new in T4 in Visual Studio 2010</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/pmvHyVT2A_8/what-s-new-in-t4-in-visual-studio-2010.aspx</link><pubDate>Thu, 15 Apr 2010 08:54:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9996390</guid><dc:creator>GarethJ</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9996390</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2010/04/15/what-s-new-in-t4-in-visual-studio-2010.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/garethj/archive/2010/04/15/what-s-new-in-t4-in-visual-studio-2010.aspx";digg_title = "What's new in T4 in Visual Studio 2010";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;OK, Visual Studio 2010 is well and truly released, so I thought I'd better catalog what goodness is in the box for all you T4 fans out there..&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;For template authors:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Preprocessed templates to allow embedding of template-based generation in arbitrary applications without a runtime T4 dependency. There is a new custom tool, new service APIs and new engine APIs to support this feature.  &lt;li&gt;Runtime error handling is improved, with better handling of null expression blocks and fewer exceptions being eaten.  &lt;li&gt;Include directives and Assembly directives now support both Windows environment variables and VS Macro variables.  &lt;li&gt;Include directives and Assembly directives now resolved from VSIX Visual Studio extensions downloaded from VS gallery.  &lt;li&gt;Include directives are now also resolved relative to the file that they are declared in to support libraries with relative includes.  &lt;li&gt;Templates always use C#/VB 4.0 and .Net 4.0 types - language version is no longer needed.  &lt;li&gt;Project/Add item templates for C# and VB and Web projects for both regular and preprocessed templates.  &lt;li&gt;T4 now works in Web Site projects.  &lt;li&gt;Generate All Files only runs the T4 custom tools in your project, not arbitrary ones like WPF.  &lt;li&gt;The service tag project stamp is no longer written willy-nilly by T4.  &lt;li&gt;New CompilerOptions flag to the template directive allows arbitrary flags to be sent to the template compiler, allowing optionstrict, optioninfer, optionexplicit etc. to be set for VB.  &lt;li&gt;VS's Custom Tool Namespace is available in CallContext with the tag "NamespaceHint".  &lt;li&gt;Templates no longer support the neutral culture, rather they always go to the invariant culture.  &lt;li&gt;T4-MsBuild to transform your templates at build time.  &lt;li&gt;The parser requires that templates with a class feature block finish with a class feature block to avoid boilerplate write statements hanging free at the end of the class causing hard-to-debug errors.  &lt;li&gt;T4's assembly set is completely separated from the containing project's assembly set to avoid picking up the wrong assemblies when a project targets previous framework versions. Project assemblies are no longer used to resolve template assembly directives.  &lt;li&gt;Assembly references will resolve from Visual Studio's PublicAssemblies folder.  &lt;li&gt;WindowsBase.dll automatically referenced from templates.  &lt;li&gt;Ability to use VS MEF components in the T4 AppDomain - also new CompositionServices helper class to make setting this up simple.  &lt;li&gt;The options page is fully localized.  &lt;li&gt;Better error messages when templates are included from internet zones or downloaded templates are included.  &lt;li&gt;The Generate All Files button is disabled while a build is in progress so there aren't any clashes.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;For custom tool builders:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Hosts can implement ITextTemplatingSessionHost to signal to the engine that they can provide a dictionary of arbitrary user data for the lifetime of the processing session. The data is accessed via a new Session property on the TextTransformation base class.  &lt;li&gt;The built-in VS host implements ITextTemplatingSessionHost and provides a default session implementation to pass data from custom tools into templates while they run in the secondary appdomain, including resolving any necessary assemblies.  &lt;li&gt;New "Parameter" directive with Name and Type properties, similar to the one in the GAX host. This allows custom tools to pass data to templates in a standard way.&amp;nbsp; It resolves from the Session dictionary, the Host via ResolveParameterValue or the CallContext.  &lt;li&gt;T4 interfaces have been split out into a separate assembly to facilitate longer term versioning without taking a dependency on T4's implementation assemblies.  &lt;li&gt;RequiresProvidesDirectiveProcessor uses a new order for processing required parameters to support richer overriding.  &lt;li&gt;BaseCodeGeneratorWithSite now exposes both GlobalServiceProvider and SiteServiceProvider members.  &lt;li&gt;New base class BaseTemplatedCodeGenerator makes it even simpler to create a T4-based custom tool with one override.  &lt;li&gt;ProvideCodeGeneratorExtension attribute makes it easy to hook up custom tools to the web site project system.  &lt;li&gt;Public access to the CacheAssembliesOptionsString in the Engine class to help control caching without magic strings.  &lt;li&gt;Directive Processors support IRecognizeHostSpecific interface to participate in decisions around forcing this flag on.  &lt;li&gt;The correct system implementation of IVsSingleFileGenerator is used rather than a T4 internal one.  &lt;li&gt;Access to the internals of the Visual Studio built-in host via ITextTemplatingComponents service interface.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;For DSL Tools users:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;ModelBus support in templates.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Phew, that's a long list - you can see that Visual Studio 2010 is a big release for T4.&lt;/p&gt; &lt;p&gt;I'll come back and edit this post to include live links as I fill in more details about some of these topics.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d5881c26-19c5-4457-895f-c315f4c7b16e" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag"&gt;Visual Studio 2010&lt;/a&gt;,&lt;a href="http://technorati.com/tags/What's+New" rel="tag"&gt;What's New&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Text+Templating" rel="tag"&gt;Text Templating&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9996390" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=pmvHyVT2A_8:DejtVTPdNrc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Tech+thrills/">Tech thrills</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2010/04/15/what-s-new-in-t4-in-visual-studio-2010.aspx</feedburner:origLink></item><item><title>Oleg on T4-MSBuild Integration</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/LLnk_TcGWuM/oleg-on-t4-msbuild-integration.aspx</link><pubDate>Wed, 14 Apr 2010 07:28:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9995648</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9995648</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2010/04/14/oleg-on-t4-msbuild-integration.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/garethj/archive/2010/04/14/oleg-on-t4-msbuild-integration.aspx";digg_title = "Oleg on T4-MSBuild Integration";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;The newly released &lt;a href="http://code.msdn.microsoft.com/vsvmsdk" target="_blank"&gt;Visualization and Modeling SDK for Visual Studio 2010&lt;/a&gt; includes support for integrating T4 with msbuild. (yay!)&lt;/p&gt; &lt;p&gt;The ever-diligent &lt;a href="http://www.olegsych.com" target="_blank"&gt;Oleg Sych&lt;/a&gt; has the &lt;a href="http://www.olegsych.com/2010/04/understanding-t4-msbuild-integration/" target="_blank"&gt;full skinny here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:312a6b90-6d0d-470e-aea3-0daa1e117368" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/msbuild" rel="tag"&gt;msbuild&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag"&gt;Visual Studio 2010&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9995648" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=LLnk_TcGWuM:v1qFajIVSGI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2010/04/14/oleg-on-t4-msbuild-integration.aspx</feedburner:origLink></item><item><title>Bending T4 to be a textual DSL host</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/DYC0jv8GO2g/bending-t4-to-be-a-textual-dsl-host.aspx</link><pubDate>Thu, 11 Mar 2010 10:10:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9976748</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9976748</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2010/03/11/bending-t4-to-be-a-textual-dsl-host.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://blogs.msdn.com/garethj/archive/2010/03/11/bending-t4-to-be-a-textual-dsl-host.aspx";digg_title = "Bending T4 to be a textual DSL host";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;The estimable MVP and T4 enthusiast, &lt;a href="http://msmvps.com/blogs/kathleen/default.aspx" target="_blank"&gt;Kathleen Dollard&lt;/a&gt; has a &lt;a href="http://msmvps.com/blogs/kathleen/archive/2009/12/11/killer-feature-for-vnext-language-embedded-dsl.aspx" target="_blank"&gt;new post&lt;/a&gt; where she's using T4's ability to spit arbitrary text as a host for a textual DSL.&lt;/p&gt; &lt;p&gt;She's set up a small DSL for describing contract interfaces for a MEF framework:&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;         &lt;span class="kwrd"&gt;new&lt;/span&gt; Interface()&lt;/pre&gt;&lt;pre&gt;         {&lt;/pre&gt;&lt;pre class="alt"&gt;            Name = &lt;span class="str"&gt;"ISearchModelBase"&lt;/span&gt;,&lt;/pre&gt;&lt;pre&gt;            Scope = Scope.Public,&lt;/pre&gt;&lt;pre class="alt"&gt;            CompositionInfo =&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;               &lt;span class="kwrd"&gt;new&lt;/span&gt; Property() {Name=&lt;span class="str"&gt;"TargetType"&lt;/span&gt;, PropertyType=&lt;span class="str"&gt;"Type"&lt;/span&gt;}&lt;/pre&gt;&lt;pre&gt;            },&lt;/pre&gt;&lt;pre class="alt"&gt;            Members =&lt;/pre&gt;&lt;pre&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;               &lt;span class="kwrd"&gt;new&lt;/span&gt; Property() {Name=&lt;span class="str"&gt;"DisplayName"&lt;/span&gt;, PropertyType=&lt;span class="str"&gt;"string"&lt;/span&gt;},&lt;/pre&gt;&lt;pre&gt;               &lt;span class="kwrd"&gt;new&lt;/span&gt; Property() {Name=&lt;span class="str"&gt;"DataName"&lt;/span&gt;, PropertyType=&lt;span class="str"&gt;"string"&lt;/span&gt;}&lt;/pre&gt;&lt;pre class="alt"&gt;            }&lt;/pre&gt;&lt;pre&gt;         }.Output() &lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;Hosting this in T4 with a couple of lines of wrapper code spits out the following output, codifying her standard implementation pattern for MEF contracts and custom attributes:
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Option&lt;/span&gt; Strict &lt;span class="kwrd"&gt;On&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;Option&lt;/span&gt; Explicit &lt;span class="kwrd"&gt;On&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Option&lt;/span&gt; Infer &lt;span class="kwrd"&gt;On&lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.Collections.Generic&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.Linq&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.ComponentModel.Composition &lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;Interface&lt;/span&gt; ISearchModelBase&lt;/pre&gt;&lt;pre class="alt"&gt;   &lt;span class="kwrd"&gt;Property&lt;/span&gt; DisplayName &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;   &lt;span class="kwrd"&gt;Property&lt;/span&gt; DataName &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Interface&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;Interface&lt;/span&gt; ISearchModelBaseComposition&lt;/pre&gt;&lt;pre class="alt"&gt;   &lt;span class="kwrd"&gt;Readonly&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt; TargetType &lt;span class="kwrd"&gt;As&lt;/span&gt; Type&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Interface&lt;/span&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;lt; MetadataAttribute() &amp;gt; _&lt;/pre&gt;&lt;pre class="alt"&gt;&amp;lt; AttributeUsage(AttributeTargets.&lt;span class="kwrd"&gt;Class&lt;/span&gt;, AllowMultiple:=&lt;span class="kwrd"&gt;False&lt;/span&gt;) &amp;gt; _&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;Class&lt;/span&gt; SearchModelBaseAttribute&lt;/pre&gt;&lt;pre class="alt"&gt;   &lt;span class="kwrd"&gt;Inherits&lt;/span&gt; ExportAttribute&lt;/pre&gt;&lt;pre&gt;   &lt;span class="kwrd"&gt;Implements&lt;/span&gt; ISearchModelBaseComposition &lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;   &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="kwrd"&gt;New&lt;/span&gt;( &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; targetType &lt;span class="kwrd"&gt;As&lt;/span&gt; Type)&lt;/pre&gt;&lt;pre class="alt"&gt;      &lt;span class="kwrd"&gt;MyBase&lt;/span&gt;.&lt;span class="kwrd"&gt;New&lt;/span&gt;(&lt;span class="kwrd"&gt;GetType&lt;/span&gt;(ISearchModelBase))&lt;/pre&gt;&lt;pre&gt;      _targetType = targetType&lt;/pre&gt;&lt;pre class="alt"&gt;   &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;   &lt;span class="kwrd"&gt;Private&lt;/span&gt; _targetType &lt;span class="kwrd"&gt;As&lt;/span&gt; Type&lt;/pre&gt;&lt;pre&gt;   &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Readonly&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt; TargetType &lt;span class="kwrd"&gt;As&lt;/span&gt; Type &lt;span class="kwrd"&gt;Implements&lt;/span&gt; ISearchModelBaseComposition.TargetType&lt;/pre&gt;&lt;pre class="alt"&gt;      &lt;span class="kwrd"&gt;Get&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;         &lt;span class="kwrd"&gt;Return&lt;/span&gt; _targetType&lt;/pre&gt;&lt;pre class="alt"&gt;      &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Get&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;   &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Class&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&amp;nbsp; &lt;p&gt;Fascinating stuff, especially when you see that these days, populating such a structure in C#4.0 is such a snap with the new initializer syntax.
&lt;p&gt;Peeking under the covers, at the attachment to Kathleen's blog entry, the code combines the DSL structure definition with the code output for VB in a way that's a bit too printf-ish for my personal taste, so I was tempted to T4 it up a bit.
&lt;p&gt;The original template passes a StringBuilder down the call tree and builds code using AppendLine():
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AppendOpen(System.Text.StringBuilder sb)&lt;/pre&gt;&lt;pre&gt;      {&lt;/pre&gt;&lt;pre class="alt"&gt;         sb.AppendLine(&lt;span class="str"&gt;"Option Strict On"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;         sb.AppendLine(&lt;span class="str"&gt;"Option Explicit On"&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;         sb.AppendLine(&lt;span class="str"&gt;"Option Infer On"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;         sb.AppendLine(&lt;span class="str"&gt;""&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;         sb.AppendLine(&lt;span class="str"&gt;"Imports System"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;         sb.AppendLine(&lt;span class="str"&gt;"Imports System.Collections.Generic"&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;         sb.AppendLine(&lt;span class="str"&gt;"Imports System.Linq"&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;         sb.AppendLine(&lt;span class="str"&gt;"Imports System.ComponentModel.Composition"&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;      }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
Instead of this, I wanted to use regular T4 syntax with a class feature block:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;      &lt;span class="kwrd"&gt;private&lt;/span&gt; void AppendOpen()&lt;/pre&gt;&lt;pre&gt;      {&lt;/pre&gt;&lt;pre class="alt"&gt;#&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;Option&lt;/span&gt; Strict &lt;span class="kwrd"&gt;On&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Option&lt;/span&gt; Explicit &lt;span class="kwrd"&gt;On&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;Option&lt;/span&gt; Infer &lt;span class="kwrd"&gt;On&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.Collections.Generic&lt;/pre&gt;&lt;pre&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.Linq&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.ComponentModel.Composition&lt;/pre&gt;&lt;pre&gt;&amp;lt;#+&lt;/pre&gt;&lt;pre class="alt"&gt;      }&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, this code is inside a nested class, so the underlying Write statements needed by T4 aren't present.&amp;nbsp; To get around this, I whipped up a trivial base class that supplies all of the necessary plumbing for T4 to be happy.&amp;nbsp;&amp;nbsp; This works because this part of T4 doesn't rely on a specific type, rather it just expects access to the members it needs and any class will do.&amp;nbsp; In my implementation I simply delegate all of the calls back out to the main T4 template.&lt;/p&gt;
&lt;p&gt;The only changes necessary to the DSL definition classes are to derive from my DslBase class and to add a trivial constructor to supply the main template to each DSL class instantiation:&lt;/p&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Interface : DslBase&lt;/pre&gt;&lt;pre&gt;{&lt;/pre&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; Interface(Microsoft.VisualStudio.TextTemplating.TextTransformation outer) : &lt;span class="kwrd"&gt;base&lt;/span&gt;(outer)&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class="alt"&gt;    }&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I've attached the base class code and a modified version of Kathleen's template for you to play with here. Enjoy.&lt;/p&gt;
&lt;iframe title="Preview" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:98px;height:115px;padding:0;background-color:#fcfcfc;" src="http://cid-eb5baaa5f2661cf8.skydrive.live.com/embedicon.aspx/.Public/DslBase.zip"&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:10e8e757-710a-40e9-9ab7-b66897691452" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Textual+DSL" rel="tag"&gt;Textual DSL&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9976748" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=DYC0jv8GO2g:7l3oSpoHuQw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Code+samples/">Code samples</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Tech+thrills/">Tech thrills</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2010/03/11/bending-t4-to-be-a-textual-dsl-host.aspx</feedburner:origLink></item><item><title>Peter on UML Tools Extensibility</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/KnQciaaR0HM/peter-on-uml-tools-extensibility.aspx</link><pubDate>Tue, 27 Oct 2009 18:56:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913635</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9913635</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/10/27/peter-on-uml-tools-extensibility.aspx#comments</comments><description>&lt;p&gt;My esteemed colleague &lt;a href="http://www.peterprovost.org/blog" target="_blank"&gt;Peter Provost&lt;/a&gt; – whom I consistently fail to convince that I’m not into process engineering ;-) - has the first in what I’m sure will be a very informative series on &lt;a href="http://www.peterprovost.org/blog/post/Extending-Visual-Studio-2010-UML-Designers-ndash3b-Part-1-Getting-Started.aspx" target="_blank"&gt;extending the UML designers in Visual Studio 2010 Ultimate Edition&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1aa7f8b0-729b-4684-a4d6-10a1254847c4" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/UML" rel="tag"&gt;UML&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio+2010" rel="tag"&gt;Visual Studio 2010&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Ultimate+Edition" rel="tag"&gt;Ultimate Edition&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913635" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=KnQciaaR0HM:xZTBemkOs9s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/UML/">UML</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/10/27/peter-on-uml-tools-extensibility.aspx</feedburner:origLink></item><item><title>DTE and T4 - Better Together</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/Vku7x8YAGb8/dte-and-t4-better-together.aspx</link><pubDate>Fri, 25 Sep 2009 21:27:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899638</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9899638</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/09/25/dte-and-t4-better-together.aspx#comments</comments><description>&lt;p&gt;A couple of folks out there have put together some really neat T4 templates that use the host-specific flag and then access Visual Studio's DTE object model to read state from other code in the project and use that as metadata for code generation.&lt;/p&gt; &lt;p&gt;&lt;a href="http://danielvaughan.orpius.com" target="_blank"&gt;Daniel Vaughan&lt;/a&gt; started out with &lt;a href="http://danielvaughan.orpius.com/post/MetaGen-A-project-metadata-generator-for-Visual-Studio-using-T4.aspx" target="_blank"&gt;a&amp;nbsp; nice post&lt;/a&gt; on using DTE to explore the source constructs within your project using the CodeModel and thence using that data to&amp;nbsp; introduce compile time strong-typing to WPF binding expressions.&lt;/p&gt; &lt;p&gt;To borrow Daniel's example, to switch from this weakly typed case&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&amp;lt;StackPanel DataContext="{Binding Source={StaticResource Person}}"&amp;gt;
    &amp;lt;TextBlock &amp;gt;Name:&amp;lt;/TextBlock&amp;gt;
    &amp;lt;TextBox Text="{Binding Name}" /&amp;gt;
&amp;lt;/StackPanel&amp;gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;to this strongly typed one which gives compile-time errors if you get the name wrong&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;&amp;lt;StackPanel DataContext="{Binding Source={StaticResource Person}}"&amp;gt;
	&amp;lt;TextBlock &amp;gt;Name:&amp;lt;/TextBlock&amp;gt;
	&amp;lt;TextBox Text="{Binding Path={x:Static Metadata:PersonMetadata.NamePath}}"/&amp;gt;
&amp;lt;/StackPanel&amp;gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;He then also talks about using the same technique to generate implementations of &lt;em&gt;INotifyPropertyChange&lt;/em&gt; that are robust to refactoring without the problems of embedded strings or the performance hit of reflection.&amp;nbsp; Code generation and declarative programming are often criticized for not having good support for refactoring, so it's nice to see a use case that actually helps support refactoring.&lt;/p&gt;
&lt;p&gt;Daniel has now expanded this into a &lt;a href="http://www.codeproject.com/KB/codegen/T4Metadata.aspx" target="_blank"&gt;full article on The Code Project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Last time, I talked about &lt;a href="http://www.codeproject.com/KB/WPF/DependencyPropertyCodeGen.aspx" target="_blank"&gt;Colin Eberhardt's article&lt;/a&gt; for generating Dependency Properties from an xml file.&amp;nbsp; Daniel's approach inspired Colin to go back and &lt;a href="http://www.scottlogic.co.uk/blog/wpf/2009/08/declarative-dependency-property-definition-with-t4-dte/" target="_blank"&gt;rework his example to use DTE&lt;/a&gt; replacing his external XML file with custom attributes on classes to simply add dependency properties like so:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;[DependencyPropertyDecl("Maximum", typeof(double), 0.0)]
[DependencyPropertyDecl("Minimum", typeof(double), 0.0)]
public partial class RangeControl : UserControl
{
    ...
}&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Very cool stuff.&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7a206d04-630a-42bf-8514-2b5863c4b6f5" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/DTE" rel="tag"&gt;DTE&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio+2008" rel="tag"&gt;Visual Studio 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Code+Generation" rel="tag"&gt;Code Generation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Dependecy+Property" rel="tag"&gt;Dependecy Property&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Databinding" rel="tag"&gt;Databinding&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Strongly-typed" rel="tag"&gt;Strongly-typed&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9899638" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=Vku7x8YAGb8:KKeDcP7fzSE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Tech+thrills/">Tech thrills</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/09/25/dte-and-t4-better-together.aspx</feedburner:origLink></item><item><title>T4 and Silverlight in Visual Studio 2008</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/OT9uPLCbdMc/t4-and-silverlight-in-visual-studio-2008.aspx</link><pubDate>Fri, 25 Sep 2009 20:32:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899609</guid><dc:creator>GarethJ</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9899609</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/09/25/t4-and-silverlight-in-visual-studio-2008.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://www.scottlogic.co.uk/blog/wpf/" target="_blank"&gt;Colin Eberhardt&lt;/a&gt; has a nice article on &lt;a href="http://www.codeproject.com" target="_blank"&gt;The Code Project&lt;/a&gt; walking through using a small textual DSL encoded in XML to define a set of dependency properties and then using that as a data source for T4 to generate all of the necessary boilerplate code.&lt;/p&gt; &lt;p&gt;Apart from being intrinsically cool, he's also doing this in a Silverlight project, and he includes the small amount of special sauce needed to get T4 generation working in a Silverlight project inside Visual Studio 2008.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;BTW, in Visual Studio 2010, T4 in Silverlight should "just work".&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6500bc74-c71f-4dea-ac02-9dedb4893e6e" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SIlverlight" rel="tag"&gt;SIlverlight&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio+2008" rel="tag"&gt;Visual Studio 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Dependecy+Property" rel="tag"&gt;Dependecy Property&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9899609" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=OT9uPLCbdMc:hzahJMfmHoM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/09/25/t4-and-silverlight-in-visual-studio-2008.aspx</feedburner:origLink></item><item><title>ASP.Net MVC T4 Updates</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/fUfdzlKM7H0/asp-net-mvc-t4-updates.aspx</link><pubDate>Fri, 25 Sep 2009 08:13:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899339</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9899339</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/09/25/asp-net-mvc-t4-updates.aspx#comments</comments><description>&lt;p&gt;Couple of newsworthy T4 links for the wildly popular &lt;a href="http://www.asp.net/mvc/" target="_blank"&gt;ASP.Net MVC&lt;/a&gt; framework.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This one is from July but I hadn't spotted it - &lt;a href="http://blogs.msdn.com/davidebb/default.aspx" target="_blank"&gt;David Ebbo&lt;/a&gt; has a new version of his &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471" target="_blank"&gt;T4MVC&lt;/a&gt; set of templates for view generation.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://thekindofme.wordpress.com/" target="_blank"&gt;Space Invader Zim&lt;/a&gt; (nice name) has a &lt;a href="http://thekindofme.wordpress.com/2009/07/01/using-custom-t4-templates-to-generate-better-controllers-in-asp-mvc/" target="_blank"&gt;walkthrough of an extension to the standard templates&lt;/a&gt; that he's been working on.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1ddd95f5-4758-4f67-b6db-0db49d4a6346" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET+MVC" rel="tag"&gt;ASP.NET MVC&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Code+Gen" rel="tag"&gt;Code Gen&lt;/a&gt;&lt;/div&gt; &lt;p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a title="http://blog.mastykarz.nl/generate-spbuiltinfieldid-class/" href="http://blog.mastykarz.nl/generate-spbuiltinfieldid-class/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9899339" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=fUfdzlKM7H0:PLYsL-T6hWI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/09/25/asp-net-mvc-t4-updates.aspx</feedburner:origLink></item><item><title>Peter Vogel on Code Generation</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/GLc4rkhm5L0/peter-vogel-on-code-generation.aspx</link><pubDate>Fri, 25 Sep 2009 08:06:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899337</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9899337</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/09/25/peter-vogel-on-code-generation.aspx#comments</comments><description>&lt;p&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px" alt="Peter Vogel" align="left" src="http://www.dotnetrocks.com/dnr_photos/PeterVogel.jpg"&gt;There's a fun interview with &lt;a href="http://www.linkedin.com/in/phvis" target="_blank"&gt;Peter Vogel&lt;/a&gt; on the subject of Code Gen on the ever-popular &lt;a href="http://www.dotnetrocks.com" target="_blank"&gt;.NET Rocks&lt;/a&gt; talkshow.&amp;nbsp; He's got a new code gen book coming out and in the interview he says he's going to have an "expansion pack" for the book to cover T4. Can't wait for that.&lt;/p&gt; &lt;p&gt;You can find the audio &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=453" target="_blank"&gt;here&lt;/a&gt; and a transcript &lt;a href="http://perseus.franklins.net/dotnetrocks_0453_peter_vogel.pdf" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:68809720-b350-44eb-9646-e0b1406cc1e2" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Code+Generation" rel="tag"&gt;Code Generation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/.NET+Rocks" rel="tag"&gt;.NET Rocks&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9899337" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=GLc4rkhm5L0:M7_alN7QO90:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/09/25/peter-vogel-on-code-generation.aspx</feedburner:origLink></item><item><title>T4 Templates for SharePoint</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/t6ps9X647ZA/t4-templates-for-sharepoint.aspx</link><pubDate>Fri, 25 Sep 2009 06:56:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899319</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9899319</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/09/25/t4-templates-for-sharepoint.aspx#comments</comments><description>&lt;p&gt;For all you SharePoint heads out there, &lt;/p&gt; &lt;p&gt;&lt;a href="http://blog.mastykarz.nl/"&gt;Waldek Mastykarz&lt;/a&gt; has a couple of neat articles on generating some of the various config files that control a SharePoint instance using T4:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a href="http://thekindofme.wordpress.com/2009/07/01/using-custom-t4-templates-to-generate-better-controllers-in-asp-mvc/"&gt;Visual Studio T4 template for SharePoint Solution (DDF)&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a title="http://blog.mastykarz.nl/visual-studio-t4-template-sharepoint-feature-definition-xml/" href="http://blog.mastykarz.nl/visual-studio-t4-template-sharepoint-feature-definition-xml/" target="_blank"&gt;Visual Studio T4 template for SharePoint Feature Definition (Feature.xml)&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a title="http://blog.mastykarz.nl/generate-spbuiltinfieldid-class/" href="http://blog.mastykarz.nl/generate-spbuiltinfieldid-class/" target="_blank"&gt;Generate your own SPBuiltInFieldId class&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Enjoy&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:22ee3dbf-47dc-45b5-8d8c-13373948d3a0" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Sharepoint" rel="tag"&gt;Sharepoint&lt;/a&gt;,&lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Code+Generation" rel="tag"&gt;Code Generation&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9899319" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=t6ps9X647ZA:IBYrCTbdMQw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/09/25/t4-templates-for-sharepoint.aspx</feedburner:origLink></item><item><title>WPF, DSL in Visual Studio 2008</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/D_Fj2ctc1U8/wpf-dsl-in-visual-studio-2008.aspx</link><pubDate>Thu, 24 Sep 2009 05:07:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9898757</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9898757</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/09/24/wpf-dsl-in-visual-studio-2008.aspx#comments</comments><description>&lt;p&gt;Although data-binding to WPF is a feature of DSL Tools in Visual Studio 2010, that hasn’t stopped our vibrant community from hacking away to get results today with VS2008.&lt;/p&gt;  &lt;p&gt;Have a look at this selection of posts:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://altinoren.com/PermaLink,guid,643ec407-4fe1-4238-a24e-20ef8b134a99.aspx" target="_blank"&gt;Using WPF As The Designer Surface In DSL Tools&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.netfxfactory.org/blogs/papers/archive/2009/09/20/provide-an-improved-user-experience-to-your-dsls.aspx" target="_blank"&gt;Provide an improved user experience to your DSL's&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Both of these use a naked objects style of approach which is pretty similar to what we’re building in to the core libraries in 2010.&lt;/p&gt;  &lt;p&gt;The last one is more appropriate for complex UI’s that don’t represent you domain model so directly and proposes putting a viewmodel in front of your model.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://fengchen.wordpress.com.cn/2009/09/22/dsl-wpf-databindin/" target="_blank"&gt;How to bridge the gap between DSL tools store and the WPF DataBinding system&lt;/a&gt;&lt;/p&gt;  &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1a9399c2-18b7-4c42-8a87-1b68be159261" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/DSL+Tools" rel="tag"&gt;DSL Tools&lt;/a&gt;,&lt;a href="http://technorati.com/tags/WPF" rel="tag"&gt;WPF&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/VSX" rel="tag"&gt;VSX&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Databinding" rel="tag"&gt;Databinding&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9898757" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=D_Fj2ctc1U8:rsA-YAFpgqU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Code+samples/">Code samples</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/09/24/wpf-dsl-in-visual-studio-2008.aspx</feedburner:origLink></item><item><title>Tangible T4 Editor</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/SqLRfqyOvQY/tangible-t4-editor.aspx</link><pubDate>Sat, 23 May 2009 08:30:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9636730</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9636730</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/05/23/tangible-t4-editor.aspx#comments</comments><description>&lt;p&gt;I've been remiss generally in not blogging while we've been heads down on Visual Studio Beta1, but never more so than in respect of another T4 Editor that's recently become available.&lt;/p&gt; &lt;p&gt;The good folks over at &lt;a href="http://t4-editor.tangible-engineering.com" target="_blank"&gt;Tangible Engineering&lt;/a&gt; have been releasing &lt;a href="http://t4-editor.tangible-engineering.com/T4-Editor-Visual-T4-Editing.html" target="_blank"&gt;several versions of their T4 Editor for Visual Studio 2008&lt;/a&gt; and now have released a &lt;a href="http://tangibleengineering.blogspot.com/2009/05/tangible-t4-editor-for-visual-studio.html" target="_blank"&gt;shiny version for Visual Studio 2010 Beta1&lt;/a&gt;.&amp;nbsp; How's that for speedy?&lt;/p&gt; &lt;p&gt;Under Visual Studio 2010 Beta1, you can find this T4 Editor by simply going to the new &lt;a href="http://blogs.msdn.com/pedrosilva/archive/2009/04/02/introducing-vs-extension-manager.aspx" target="_blank"&gt;Extension Manager&lt;/a&gt; (find it under the Tools menu)&lt;/p&gt; &lt;p&gt;So for all you T4 fiends, you now have a choice of editors (in strictly alphabetical order)&lt;/p&gt; &lt;table border="0" cellspacing="0" cellpadding="2" width="748"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="153"&gt;&amp;nbsp;&lt;/td&gt; &lt;td valign="top" width="190"&gt;Visual Studio 2010 Beta1&lt;/td&gt; &lt;td valign="top" width="177"&gt;Visual Studio 2008&lt;/td&gt; &lt;td valign="top" width="226"&gt;Visual Studio 2005&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="153"&gt;Clarius Consulting&lt;/td&gt; &lt;td valign="top" width="190"&gt;Soon, I'm sure. ;-)&lt;/td&gt; &lt;td valign="top" width="177"&gt;&lt;a href="http://www.visualt4.com/T4EditorForVS2008-Community.msi.aspx" target="_blank"&gt;Get it&lt;/a&gt;&lt;/td&gt; &lt;td valign="top" width="226"&gt;&lt;a href="http://www.visualt4.com/T4EditorForVS2005-Community.msi.aspx" target="_blank"&gt;Get it&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="153"&gt;Tangible Engineering&lt;/td&gt; &lt;td valign="top" width="190"&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/050a2994-cd28-4d1f-a185-9814e3389f4c" target="_blank"&gt;Get it&lt;/a&gt;&lt;/td&gt; &lt;td valign="top" width="177"&gt;&lt;a href="http://t4-editor.tangible-engineering.com/T4-Editor-Visual-T4-Editing.html" target="_blank"&gt;Get it&lt;/a&gt;&lt;/td&gt; &lt;td valign="top" width="226"&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Keep on transforming those templates.&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:725825d8-47d0-4729-8ad2-ed5e4ac9166b" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4Editor" rel="tag"&gt;T4Editor&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Tangible+Engineering" rel="tag"&gt;Tangible Engineering&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Clarius+Consulting" rel="tag"&gt;Clarius Consulting&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9636730" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=SqLRfqyOvQY:6AlA7sLSuRY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Tech+thrills/">Tech thrills</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/05/23/tangible-t4-editor.aspx</feedburner:origLink></item><item><title>DSL Tools 2010 Beta1 Launches!</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/bk-ofdTluAY/dsl-tools-2010-beta1-launches.aspx</link><pubDate>Sat, 23 May 2009 06:37:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9636601</guid><dc:creator>GarethJ</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9636601</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/05/23/dsl-tools-2010-beta1-launches.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/jmprieur/default.aspx" target="_blank"&gt;Jean-Marc&lt;/a&gt;&amp;nbsp;&lt;a href="http://blogs.msdn.com/jmprieur/archive/2009/05/22/announcing-the-visual-studio-2010-dsl-sdk-beta-1.aspx" target="_blank"&gt;announced today&lt;/a&gt; that the latest &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=390fbb56-4e2c-4585-8f0c-ef51cf4cc93e&amp;amp;displaylang=en" target="_blank"&gt;new beta version of DSL Tools&lt;/a&gt; launched today hot on the heels of the recent &lt;a href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx" target="_blank"&gt;Visual Studio 2010&lt;/a&gt; and &lt;a href="http://go.microsoft.com/fwlink/?LinkId=147422" target="_blank"&gt;Visual Studio 2010 SDK&lt;/a&gt; beta releases.&lt;/p&gt; &lt;p&gt;The team is really proud of all the great features we're shipping in this release.&amp;nbsp; I hope you enjoy them too. From Jean-Marc's blog:&lt;/p&gt; &lt;blockquote&gt; &lt;ol&gt; &lt;li&gt;Different models can now interact with each other, (and with Visual Studio Team System Architecture UML designers), using the &lt;b&gt;ModelBus&lt;/b&gt;. A DSL author can choose to generate a ModelBus adapter, that will expose his model to other models or tools.  &lt;li&gt;Databinding support has been added, allowing Windows.Forms and WPF &lt;b&gt;form-based designers&lt;/b&gt; to be created by binding a standard winform or WPF-based UI directly to DSL models. This enables developers to quickly create designers such as the .ResX or .settings designers in Visual Studio.  &lt;li&gt;It is now possible to have completely or partially &lt;b&gt;read only models&lt;/b&gt;, which can be used for instance by reviewing and commenting tools.  &lt;li&gt;A number of UI enhancements have been added, including :&lt;/li&gt;&lt;/ol&gt; &lt;ul&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;moveable labels&lt;/b&gt; for connectors,  &lt;li&gt;&lt;b&gt;sticky toolbox&lt;/b&gt; (when the user double-clicks on an item in the toolbox,it's not necessary to return to the toolbox for repeated applications of the tool),  &lt;li&gt;quick &lt;b&gt;navigation and editing&lt;/b&gt; of compartments with the keyboard  &lt;li&gt;&lt;b&gt;Copy and paste&lt;/b&gt; of diagram elements &lt;b&gt;to images&lt;/b&gt; (in Bitmap and .wmf/emf)  &lt;li&gt;&lt;b&gt;Copy and paste of model elements&lt;/b&gt; in or between diagrams&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;ol&gt; &lt;li&gt;The notion of &lt;b&gt;DslLibrary&lt;/b&gt; has been introduced. This enables factorizing and componentizing DSLs (for instance having several domain models have the same base-domain class). &lt;i&gt;The authoring for this feature will not be present in Beta1&lt;/i&gt; &lt;li&gt;The DSLs can now be extended by third parties after they have deployment. &lt;i&gt;The authoring for this feature will not be present in Beta1&lt;/i&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt; &lt;p&gt;Check out the &lt;a href="http://code.msdn.microsoft.com/DslTools" target="_blank"&gt;Code Gallery page for samples and beta docs&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;I'll start to list out in more detail the new T4 features after I get my breath back a bit. :-)&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:98196d39-209f-4a1a-a6a7-517a8751db40" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/DSL+Tools" rel="tag"&gt;DSL Tools&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;, &lt;a href="http://technorati.com/tags/2010" rel="tag"&gt;2010&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Annouce" rel="tag"&gt;Annouce&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9636601" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=bk-ofdTluAY:qH0O5i8ZvVA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Tech+thrills/">Tech thrills</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/05/23/dsl-tools-2010-beta1-launches.aspx</feedburner:origLink></item><item><title>Customizing Generated Resources in DSL Tools</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/IGQQUq1ybBk/customizing-generated-resources-in-dsl-tools.aspx</link><pubDate>Sat, 23 May 2009 06:15:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9636578</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9636578</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/05/23/customizing-generated-resources-in-dsl-tools.aspx#comments</comments><description>&lt;p&gt;Most of the code we generate with DSL Tools is pretty agnostic about its location or the filename you use for the template or the generated output.&lt;/p&gt; &lt;p&gt;The one exception to this is the generated resource file (usually a pair called DomainModelResx.tt/DomainModelResx.resx)&lt;/p&gt; &lt;p&gt;The reason this puppy is a little more sensitive is that the output resx is generated as item with a compile type of&amp;nbsp; Embedded Resource in the Dsl csharp project that it lives in.&lt;/p&gt; &lt;p&gt;This causes the project system to pick up the relative path from the project root to the resx file and use that to form the Id that is used to embed the resource into the assembly.&lt;/p&gt; &lt;p&gt;Naturally, we also have to reference the resource at runtime in order to make use of its contents and to do that, we need to encode its Id at the point of use.&amp;nbsp; This happens to be in the DomainModel.tt/DomainModel.cs pair.&lt;/p&gt; &lt;p&gt;What this means is that we have to provide some logic for generating that resource Id in our T4 templates as there isn't an API in Visual Studio to get hold of it :-(&lt;/p&gt; &lt;p&gt;Rather than trying to be too clever, we just use a simple scheme that expects the resource to be in the default GeneratedCode folder structure.&lt;/p&gt; &lt;p&gt;OK, that's all a bit abstract, so here's an example.&lt;/p&gt; &lt;p&gt;Given a normal folder structure like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_thumb_1.png" width="259" height="320"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt; You'll get a resource created like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_thumb_2.png" width="473" height="164"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You can see that the GeneratedCode folder name has been encoded into the resource Id.&lt;/p&gt; &lt;p&gt;We'll match that in the generated DomainModel.cs file with the following snippet&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// The base name of this model's resources.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; ResourceBaseName = &lt;span style="color: #006080"&gt;"MicrosoftCorp.DemoLanguage.GeneratedCode.DomainModelResx"&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So now suppose you go and rearrange your DSL project and now there's an intermediate directory called Dummy? And how about you also rename the template and generated file to be simply DslResources.tt/resx?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_thumb_5.png" width="301" height="386"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You'll get an embedded resource like this.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/CustomizingGeneratedResourcesinDSLTools_10AE3/image_thumb_6.png" width="502" height="153"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So far, this is all just regular VS stuff and not much to do with DSL Tools, but if we peek into DomainModel.tt/.cs, we'll see that the generated code has no idea that it has been moved and doesn't change that ResourceBaseName constant. &lt;/p&gt;
&lt;p&gt;So how do we fix it up? We wouldn't leave you in the lurch now would we? No, of course not.&lt;/p&gt;
&lt;p&gt;As an aside, we've done some work in DSL 2010 to let that directory change peek through into the template, but that doesn't help with the resource file name change.&lt;/p&gt;
&lt;p&gt;To allow fine-grained control over matching the generated code path and resource name, we added three optional parameters to the DSL directive processor used in DSL Tools' .tt files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GeneratedCodeFolder: allow you to specify the folder relative to the project root where the generated resources live.&lt;/li&gt;
&lt;li&gt;GeneratedResourceFile: allows you to specify the filename for the resource base name&lt;/li&gt;
&lt;li&gt;ProjectDefaultNamespace: allows you to override the project file's default namespace as the starting point of the resource base name&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Here's an example of using the first two to match up our project changes&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;lt;#@ Dsl processor=&lt;span style="color: #006080"&gt;"DslDirectiveProcessor"&lt;/span&gt;  requires=&lt;span style="color: #006080"&gt;"fileName='..\DslDefinition.dsl';GeneratedCodeFolder='Dummy.GeneratedCode';GeneratedResourceFile='DslResources'"&lt;/span&gt; #&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We simply catenate the three values to form the overall base name, but keeping them separate allows us to reuse them in other scenarios. Here's the result, which matches the actual embedded resource:&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// The base name of this model's resources.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; ResourceBaseName = &lt;span style="color: #006080"&gt;"MicrosoftCorp.DemoLanguage.Dummy.GeneratedCode.DslResources"&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;These extra parameters are pretty undiscoverable options on the DSL directive processor, so I hope this tip helps someone out.&amp;nbsp; It's also a good example of how you can easily expand the directive processor we generate for you with your own DSL.&amp;nbsp; These three parameters were all added purely additively in a partial class next to the generated code for the dsl directive processor.&amp;nbsp; (Yes, we do generate the dsl directive processor that you use for parsing dsls to generate the directive processors for other dsls :-) )&lt;/p&gt;
&lt;p&gt;Have fun rearranging your projects.&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:066aa283-69b7-400d-af07-24450070274a" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/DSL+Tools" rel="tag"&gt;DSL Tools&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DirectiveProcessor" rel="tag"&gt;DirectiveProcessor&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Resources" rel="tag"&gt;Resources&lt;/a&gt;, &lt;a href="http://technorati.com/tags/ResX" rel="tag"&gt;ResX&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9636578" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=IGQQUq1ybBk:H9FezvPg5bo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/05/23/customizing-generated-resources-in-dsl-tools.aspx</feedburner:origLink></item><item><title>Software Factories Redux</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/Jhn3iGDRJUo/software-factories-redux.aspx</link><pubDate>Sat, 28 Feb 2009 21:09:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9451121</guid><dc:creator>GarethJ</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9451121</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/02/28/software-factories-redux.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/donsmith" target="_blank"&gt;Don&lt;/a&gt; has a great post on &lt;a href="http://blogs.msdn.com/donsmith/archive/2009/02/25/on-the-subject-of-software-factories.aspx" target="_blank"&gt;where the p&amp;amp;p team are going with Software Factories and GAT/GAX&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;No doubt we'll be talking to those good folks about how they can take advantage of new features in DSL 2010 in their 2010 versions of Factories.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b5be694d-2c9c-488a-aabe-0930ccb35045" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Software+Factories" rel="tag"&gt;Software Factories&lt;/a&gt;, &lt;a href="http://technorati.com/tags/VSX" rel="tag"&gt;VSX&lt;/a&gt;, &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DSL+Tools" rel="tag"&gt;DSL Tools&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9451121" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=Jhn3iGDRJUo:zJV8T14iUfs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Built+with+DSL+Tools/">Built with DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/02/28/software-factories-redux.aspx</feedburner:origLink></item><item><title>TellMe Voice Studio Beta1</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/O4hq5_CD3_g/tellme-voice-studio-beta1.aspx</link><pubDate>Fri, 06 Feb 2009 11:58:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9401527</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9401527</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/02/06/tellme-voice-studio-beta1.aspx#comments</comments><description>&lt;p&gt;I just noticed that the good folks over at &lt;a href="http://studio.tellme.com/" target="_blank"&gt;TellMe&lt;/a&gt; (a relatively new bit of Microsoft) have shipped a beta of their Voice Studio voice application dev tool, based on DSL Tools.&amp;nbsp; Very cool indeed! (I seem to be saying this a lot lately)&lt;/p&gt; &lt;p&gt;&lt;a href="http://studio.tellme.com/" target="_blank"&gt;&lt;img height="544" src="https://studio.tellme.com/downloads/voicestudio/screenshots/image001.png" width="744"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I love the process of developing voice apps - One of the last things I did in Microsoft before joining Visual Studio was to build a voice-enabled kiosk for helping folks access local government services.&amp;nbsp; It was seriously rewarding when you managed to have testers use a natural seeming set of sentences to get something done.&amp;nbsp; There's just a certain Star Trek magic to the whole process.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I think part of me may end up getting a similar buzz from extracting structured data from textual DSLs - MGrammar crossed with text extraction maybe - be interesting to go the same route as voice and have a confidence match for the textual DSL and then have a process of refinement from relatively vague textual musings to specific textual models.&lt;/p&gt; &lt;p&gt;Many congrats to the TellMe team (or as I'm steadily learning the colloquialisms over here, GO TellMe!)&lt;/p&gt; &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8129482e-52e0-42ea-ae9b-9795423bd9c4" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/VSX" rel="tag"&gt;VSX&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DSL+Tools" rel="tag"&gt;DSL Tools&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Speech" rel="tag"&gt;Speech&lt;/a&gt;, &lt;a href="http://technorati.com/tags/TellMe" rel="tag"&gt;TellMe&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9401527" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=O4hq5_CD3_g:ec6H1I1WCz4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Tech+thrills/">Tech thrills</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Built+with+DSL+Tools/">Built with DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/02/06/tellme-voice-studio-beta1.aspx</feedburner:origLink></item><item><title>Clarius take T4 editing to the next level</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/qTy1Iakux2E/clarius-take-t4-editing-to-the-next-level.aspx</link><pubDate>Thu, 05 Feb 2009 01:23:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9396840</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9396840</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/02/04/clarius-take-t4-editing-to-the-next-level.aspx#comments</comments><description>&lt;p&gt;I see that &lt;a href="http://www.clariusconsulting.net/" target="_blank"&gt;Clarius&lt;/a&gt; have now got to an alpha stage for the next stage of their T4 editing toolset.&lt;/p&gt; &lt;p&gt;As well as their &lt;a href="http://www.visualt4.com/T4EditorForVS2008-Community.msi.aspx" target="_blank"&gt;Community Edition&lt;/a&gt; and Pro Edition, they're now going to offer a full-featured code generation environment they're calling &lt;em&gt;Visual T4 Code Generator&lt;/em&gt;, including tight integration with server explorer, database tables and XML as well as a multi-file generation implementation out of the box and &lt;a href="http://www.visualt4.com/features.html" target="_blank"&gt;lots more beside&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Here's a short video of their database support:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.visualt4.com/DbServerExplorer.htm" target="_blank"&gt;&lt;img height="231" alt="click to enlarge" src="http://www.visualt4.com/img/video01-preview.png" width="640"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Once again, very nice indeed.&lt;/p&gt; &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:05771aa6-fa51-4187-b7d2-ba119b1ccbab" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;, &lt;a href="http://technorati.com/tags/T4Editor" rel="tag"&gt;T4Editor&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Clarius" rel="tag"&gt;Clarius&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9396840" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=qTy1Iakux2E:f5D0IQ1755I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/02/04/clarius-take-t4-editing-to-the-next-level.aspx</feedburner:origLink></item><item><title>More on T4 in ASP.Net MVC</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/SipqA6RP_LA/more-on-t4-in-asp-net-mvc.aspx</link><pubDate>Thu, 05 Feb 2009 01:08:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9396809</guid><dc:creator>GarethJ</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9396809</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/02/04/more-on-t4-in-asp-net-mvc.aspx#comments</comments><description>&lt;p&gt; Abhishek from the MVC team has just &lt;a href="http://blogs.msdn.com/webdevtools/archive/2009/01/29/t4-templates-a-quick-start-guide-for-asp-net-mvc-developers.aspx" target="_blank"&gt;posted some detailed instructions on using the new T4 customization features&lt;/a&gt; in the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=141184&amp;amp;clcid=0x409" target="_blank"&gt;ASP.Net MVP release candidate&lt;/a&gt;&lt;/p&gt; &lt;p&gt; Very cool.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;img title="T4EditingWithClarius" height="337" alt="T4EditingWithClarius" src="http://blogs.msdn.com/blogfiles/webdevtools/WindowsLiveWriter/T4TemplatesAQuickStartGuide_D21E/T4EditingWithClarius_thumb.jpg" width="449" border="0"&gt;&lt;/p&gt; &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c1337ab4-fc83-41bf-ae49-85108b99e92e" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;, &lt;a href="http://technorati.com/tags/ASP.Net+MVC" rel="tag"&gt;ASP.Net MVC&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Code+generation" rel="tag"&gt;Code generation&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Visual+Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9396809" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=SipqA6RP_LA:t8kBT5_nogQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/02/04/more-on-t4-in-asp-net-mvc.aspx</feedburner:origLink></item><item><title>T4 Adoption continues with ASP.Net MVC Tools</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/xlNBEq0oJ0U/t4-adoption-continues-with-asp-net-mvc-tools.aspx</link><pubDate>Tue, 13 Jan 2009 02:52:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9311347</guid><dc:creator>GarethJ</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9311347</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/01/12/t4-adoption-continues-with-asp-net-mvc-tools.aspx#comments</comments><description>&lt;p&gt;Ok, the big guns are pitching in now :-) &lt;/p&gt;  &lt;p&gt;Hot on the heels of the tooling for &lt;a href="http://www.t4editor.net/" target="_blank"&gt;LINQ-to-Entities folks adopting T4 for their next release&lt;/a&gt;, comes another.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/default.aspx" target="_blank"&gt;Scott Guthrie&lt;/a&gt; &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/12/19/asp-net-mvc-design-gallery-and-upcoming-view-improvements-with-the-asp-net-mvc-release-candidate.aspx" target="_blank"&gt;just blogged&lt;/a&gt; about a new RC of ASP.Net MVC that will shortly be coming along.&amp;#160; It's a long post, but down in the section on view templates in the scaffolding system, he mentions that they use T4 as a one-time generation technology to set these up based on your data.&lt;/p&gt;  &lt;p&gt;Of course, this means that the generation is fully customizable.&lt;/p&gt;  &lt;p&gt;I'm seeing the beginnings of a trend where product groups are finding they can get often-requested features for code generation customization by going the T4 route rather than hardcoding CodeDOM trees or some other tough to modify solution.&lt;/p&gt;  &lt;p&gt;All isn't perfect, as of course this type of customizatio tends to require comparison of product and user templates when new versions of things come out.&amp;#160; See Oleg's excellent &lt;a href="http://www.olegsych.com/2008/04/t4-template-design/" target="_blank"&gt;encapsulation techniques&lt;/a&gt; (Nested Template Class especially) for ways to mitigate that.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:db1e6d67-9d36-4783-a832-a62042b9a955" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual%20Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Code%20Generation" rel="tag"&gt;Code Generation&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Text%20Templating" rel="tag"&gt;Text Templating&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9311347" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=xlNBEq0oJ0U:xQqANEvO3GU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Built+with+DSL+Tools/">Built with DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/01/12/t4-adoption-continues-with-asp-net-mvc-tools.aspx</feedburner:origLink></item><item><title>T4 Interview in Redmond Developer News</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/7mP5-9-RuJ8/t4-interview-in-redmond-developer-news.aspx</link><pubDate>Fri, 09 Jan 2009 04:53:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9301137</guid><dc:creator>GarethJ</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9301137</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2009/01/09/t4-interview-in-redmond-developer-news.aspx#comments</comments><description>&lt;p&gt;A couple of months ago, &lt;a href="http://www.watersworks.com/" target="_blank"&gt;John K. Waters&lt;/a&gt; of &lt;a href="http://reddevnews.com/default.aspx" target="_blank"&gt;Redmond Developer News&lt;/a&gt; was kind enough to interview &lt;a href="http://blog.wekeroad.com/" target="_blank"&gt;Rob Conery&lt;/a&gt; and I about T4 and code generation in general.&lt;/p&gt;  &lt;p&gt;You can find the &lt;a href="http://reddevnews.com/news/devnews/article.aspx?editorialsid=1199" target="_blank"&gt;results here&lt;/a&gt;. &lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6da99fc4-1ac2-4b96-98eb-4a3977961082" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/T4" rel="tag"&gt;T4&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Code%20Generaton" rel="tag"&gt;Code Generaton&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Text%20Templating" rel="tag"&gt;Text Templating&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual%20Studio" rel="tag"&gt;Visual Studio&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9301137" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=7mP5-9-RuJ8:QmCfHCmrzOs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2009/01/09/t4-interview-in-redmond-developer-news.aspx</feedburner:origLink></item><item><title>DSL 2010 Feature Dives: T4 Preprocessing - Part Two - Basic Design</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/u3G_hEt7LCU/dsl-2010-feature-dives-t4-preprocessing-part-two-basic-design.aspx</link><pubDate>Wed, 12 Nov 2008 03:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9061039</guid><dc:creator>GarethJ</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9061039</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2008/11/12/dsl-2010-feature-dives-t4-preprocessing-part-two-basic-design.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lat time we looked at the "WHy" of T4 preprocessing - now let's look at an overview of the how.&lt;/P&gt;
&lt;P&gt;To explain the new features, it's helpful to have a look at the current way data flows through T4 2008. Let's suppose you have a trivial template generating some trivial output:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_2.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=134 alt=image src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_thumb.png" width=640 border=0 mce_src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now to get from the template to it's output, the T4 engine goes through three stages:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_4.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=229 alt=image src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_thumb_1.png" width=701 border=0 mce_src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In the first, &lt;STRONG&gt;Preprocess&lt;/STRONG&gt; stage, the template is parsed into a series of blocks, any directives found within it are acted on (for example, to set the output extension or to include a sub-template) and then a "Template class" is generated that represents code to produce the final output of the template.&amp;nbsp; In this case, the template class would look something like the following (I've simplified a bit):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_6.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=448 alt=image src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_thumb_2.png" width=712 border=0 mce_src="http://blogs.msdn.com/blogfiles/garethj/WindowsLiveWriter/DSL2010FeatureDivesT4PreprocessingPartTw_E77D/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;T4 supplies the base class TextTransformation, which contains the &lt;EM&gt;Write&lt;/EM&gt; family of helpers which simply write to a StringBuilder exposed by the GenerationEnvironment property.&lt;/P&gt;
&lt;P&gt;The second stage takes the text of this class and compiles it using the CodeDOM to produce a temporary assembly.&lt;/P&gt;
&lt;P&gt;The third stage loads the temp assembly, creates an instance of the &lt;EM&gt;Transform&lt;/EM&gt; class and calls the &lt;EM&gt;TransformText&lt;/EM&gt; method on it to produce the final output of the template.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So that's what happens at present.&amp;nbsp; What do we need to change if we want to run the template in arbitrary applications?&lt;/P&gt;
&lt;P&gt;Firstly, we need to split up the stages. Indeed, if the template is going to be built as part of some application, T4 doesn't need to get involved in stage two at all - the user will presumably have their build environment set up for compiling and deploying application code and the template class will now just become part of that code. So we'll need new APIs and tools for Stage One that return the code for the template class, and we can ignore Stage Two.&lt;/P&gt;
&lt;P&gt;For Stage Three, the host application will need to run the template.&amp;nbsp; Clearly it can just call the TransformText method as it has a trivial API - although it may have to do so via reflection if the set of templates is in any way dynamic as there is no interface implemented here, just a standard signature.&amp;nbsp; (Actually, the new &lt;EM&gt;dynamic&lt;/EM&gt; feature in C# 4.0 should make this a breeze).&amp;nbsp; However, this tells us we'll need a way for the new Stage One API to specify more detail (such as the name and namespace) about the template class to be generated.&lt;/P&gt;
&lt;P&gt;Finally for stage three, the base class, &lt;EM&gt;TextTransformation,&lt;/EM&gt; becomes a problem.&amp;nbsp; This class lives in the T4 assembly, which only ships in Visual Studio, so you will likely not have it available in your deployment environment.&amp;nbsp; Luckily the contents of this base class are rather trivial helper methods on the whole.&amp;nbsp; To address this, if you don't specify a base class, we'll make T4 generate the helpers directly into your template class, relieving you of the dependency.&amp;nbsp; Alternatively, it's pretty easy to add a set of helpers to any base class that you add to your own deployable code, so long as they fulfill the signature that the template class needs.&lt;/P&gt;
&lt;P&gt;Next time we'll go into detail on what APIs will be available and then fill in some details where I've oversimplified in this explanation.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:0767317B-992E-4b12-91E0-4F059A8CECA8:aa62cb1a-f309-4deb-81c6-44f4c0705701 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;Technorati Tags: &lt;A href="http://technorati.com/tags/T4" rel=tag mce_href="http://technorati.com/tags/T4"&gt;T4&lt;/A&gt;, &lt;A href="http://technorati.com/tags/DSL%20Tools" rel=tag mce_href="http://technorati.com/tags/DSL%20Tools"&gt;DSL Tools&lt;/A&gt;, &lt;A href="http://technorati.com/tags/Domain-Specific%20Language" rel=tag mce_href="http://technorati.com/tags/Domain-Specific%20Language"&gt;Domain-Specific Language&lt;/A&gt;, &lt;A href="http://technorati.com/tags/Code%20Generation" rel=tag mce_href="http://technorati.com/tags/Code%20Generation"&gt;Code Generation&lt;/A&gt;, &lt;A href="http://technorati.com/tags/Visual%20Studio%202010" rel=tag mce_href="http://technorati.com/tags/Visual%20Studio%202010"&gt;Visual Studio 2010&lt;/A&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9061039" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=u3G_hEt7LCU:XdUCjR7IVZY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2008/11/12/dsl-2010-feature-dives-t4-preprocessing-part-two-basic-design.aspx</feedburner:origLink></item><item><title>DSL 2010 Feature Dives: T4 Preprocessing - Part One - Rationale</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/0456S4b4Tao/dsl-2010-feature-dives-t4-preprocessing-rationale.aspx</link><pubDate>Wed, 12 Nov 2008 01:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9060862</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9060862</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2008/11/11/dsl-2010-feature-dives-t4-preprocessing-rationale.aspx#comments</comments><description>&lt;p&gt;Strictly, this isn't a DSL 2010 feature, but a general Visual Studio 2010 feature; T4 is only coupled organizationally to DSL Tools, not technically, but it fits into our current announcements, so I won't worry about that too much.&lt;/p&gt; &lt;p&gt;Over the last year or so, I've been fielding an increasing number of requests from folks who want to use T4 to produce output in scenarios other than at design-time inside Visual Studio.  Just to be clear, T4 in its 2008 incarnation is not suitable for use on the server, or in any concurrent, multi-threaded scenario - there's nothing specifically wrong with the code in this regard that we know of, but it's simply not tested in this arena, and we choose not to support something that hasn't been tested.  T4 also only ships inside Visual Studio SKUs, so you have some unfortunate installation and interpretation of your EULA to do if you wanted to look at using it in another scenario.&lt;/p&gt; &lt;p&gt;However, we're very aware of this pent-up demand, and a conversation with the &lt;a mce_href="http://blogs.msdn.com/efdesign/default.aspx" target="_blank" href="http://blogs.msdn.com/efdesign/default.aspx"&gt;Entity Framework team&lt;/a&gt; brought our thinking caps out.&lt;/p&gt; &lt;p&gt;What we came up with was an assertion that want something like the following:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;In a high percentage of scenarios for using T4 at runtime (as opposed to design-time), the template only changes as part of a software installation; rather the input data for the template is changing in order to produce differing output.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;For example, you can imagine T4 being used to implement some transform between EDI data and XML data in a business workflow.  It's likely that the structure of the required XML document is an implementation artifact of the workflow, whereas clearly the instance documents of the XML are directly driven by the instance of EDI data that's presented.&lt;/p&gt; &lt;p&gt;On this basis, we realized that if we decoupled T4's preprocessing stage from its compile and run stages, we could produce template code that could repeatably take input and produce template output that we'd be happy to support running in any .Net environment, thus enabling a lot of the scenarios that customers had asked for.&lt;/p&gt; &lt;p&gt;We call this feature Template Preprocessing and next time I'll describe the high level design points.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:aa62cb1a-f309-4deb-81c6-44f4c0705701" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a mce_href="http://technorati.com/tags/T4" rel="tag" href="http://technorati.com/tags/T4"&gt;T4&lt;/a&gt;, &lt;a mce_href="http://technorati.com/tags/DSL%20Tools" rel="tag" href="http://technorati.com/tags/DSL%20Tools"&gt;DSL Tools&lt;/a&gt;, &lt;a mce_href="http://technorati.com/tags/Domain-Specific%20Language" rel="tag" href="http://technorati.com/tags/Domain-Specific%20Language"&gt;Domain-Specific Language&lt;/a&gt;, &lt;a mce_href="http://technorati.com/tags/Code%20Generation" rel="tag" href="http://technorati.com/tags/Code%20Generation"&gt;Code Generation&lt;/a&gt;, &lt;a mce_href="http://technorati.com/tags/Visual%20Studio%202010" rel="tag" href="http://technorati.com/tags/Visual%20Studio%202010"&gt;Visual Studio 2010&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9060862" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=0456S4b4Tao:TKQYiruKCB4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Enterprise+Development/">Enterprise Development</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2008/11/11/dsl-2010-feature-dives-t4-preprocessing-rationale.aspx</feedburner:origLink></item><item><title>Nice step-by-step on adding a menu to DSL Tools 2008</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/pU62GNcPX_k/nice-step-by-step-on-adding-a-menu-to-dsl-tools-2008.aspx</link><pubDate>Wed, 12 Nov 2008 00:12:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9060807</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9060807</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2008/11/11/nice-step-by-step-on-adding-a-menu-to-dsl-tools-2008.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://stalamoni.blogspot.com/" target="_blank"&gt;Sebastian Talamoni&lt;/a&gt; has a nice guide to &lt;a href="http://stalamoni.blogspot.com/2007/12/adding-menu-to-dsl-using-vsnet-2008-sdk.html" target="_blank"&gt;adding a menu using a vsct&lt;/a&gt; file.&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c86567bb-84f5-4363-bf39-095f14608981" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/DSL%20Tools" rel="tag"&gt;DSL Tools&lt;/a&gt;, &lt;a href="http://technorati.com/tags/VSX" rel="tag"&gt;VSX&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9060807" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=pU62GNcPX_k:Pea3JIFa3lg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Code+samples/">Code samples</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2008/11/11/nice-step-by-step-on-adding-a-menu-to-dsl-tools-2008.aspx</feedburner:origLink></item><item><title>New DSL Tools lab</title><link>http://feedproxy.google.com/~r/GarethjsWeblog/~3/vqA8LpqsnIo/new-dsl-tools-lab.aspx</link><pubDate>Tue, 11 Nov 2008 23:51:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9060781</guid><dc:creator>GarethJ</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.msdn.com/b/garethj/rsscomments.aspx?WeblogPostID=9060781</wfw:commentRss><comments>http://blogs.msdn.com/b/garethj/archive/2008/11/11/new-dsl-tools-lab.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/jmprieur/default.aspx" target="_blank"&gt;Jean-Marc&lt;/a&gt; has &lt;a href="http://blogs.msdn.com/jmprieur/archive/2008/11/10/the-dsl-tools-lab-is-available.aspx" target="_blank"&gt;just released&lt;/a&gt; &lt;a href="http://code.msdn.microsoft.com/DSLToolsLab" target="_blank"&gt;a complete walkthrough of DSL Tools for Visual Studio 2008 aimed at DSL beginners&lt;/a&gt; as a lab on CodeGallery.&lt;/p&gt; &lt;p&gt;&lt;img height="296" alt="StateMachineSample.jpg" src="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=DSLToolsLab&amp;amp;DownloadId=3725" width="640"&gt;&lt;/p&gt; &lt;p&gt;Here you can see the language from the lab designing mouse gestures for manipulating primitives in a simple graphics program.&lt;/p&gt; &lt;p&gt;Very nice indeed.&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7fd7cb8f-658b-475c-bf11-6067672fbbb5" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/DSL%20Tools" rel="tag"&gt;DSL Tools&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Modeling" rel="tag"&gt;Modeling&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Hands-on%20lab" rel="tag"&gt;Hands-on lab&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Domain-Specific%20Language" rel="tag"&gt;Domain-Specific Language&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9060781" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GarethjsWeblog?a=vqA8LpqsnIo:4AuYAiK_VRc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GarethjsWeblog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Modeling/">Modeling</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Code+samples/">Code samples</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/DSL+Tools/">DSL Tools</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/VSX/">VSX</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/garethj/archive/tags/T4/">T4</category><feedburner:origLink>http://blogs.msdn.com/b/garethj/archive/2008/11/11/new-dsl-tools-lab.aspx</feedburner:origLink></item></channel></rss>
