
T4
Get flash to fully experience Pearltrees
I’m a bit quicker off the mark than I was with our Beta as this is my first day back from vacation after our Release Candidate has launched . We have one final significant T4 feature to add for Visual Studio 2012 in addition to all of the stuff from out beta and developer previews , and it’s a doozy! T4 template debugging In past releases of Visual Studio, debugging T4 templates has been a little more work than we’d like, so we’ve addressed that in this release with a simple to use but full-featured debugging experience: You’ll see the ‘Debug T4 Template’ menu item above on the context menu for the template in the Solution Explorer.
What’s new with T4 in Visual Studio 2012 Release Candidate - Official T4 team blog
Generating async WCF OperationContract signatures with a T4 template - Christian Weyer's Blog
From time to time it happens that people want to use the async programming model in WCF based on the IAsyncResult approach - either on the client or the service side. Writing all the asynchronous operation contract signatures is quite a tedious and error-prone task. Given this fact, design-time code generation with a T4 template may come in very handy for this purpose. The following is my first try to create such a T4 template and it seems to work for the scenarios I need it for.T4 template consuming a WCF service
Multiple outputs from T4 made easy – revisited
My multiple outputs from t4 made easy post contained a class making it easy to produce multiple files from Visual Studio’s text templating engine (T4). While useful it had a few issues: Getting start/end blocks mixed up resulted in unpredictable behaviour Files were rewritten even when content did not change Did not play well with source control Files not always deleted in VS Failed in Visual Studio’s project-less Web Sites This helper class forms the basis of multiple file output for Entity Framework templates in .NET 4.0 and the LINQ to SQL templates on CodePlex so we (Jeff Reed, Andrew Peters and myself) made the following changes. Improvements Simpler block handlingFor example, you could create a template to define an HTML page: <html><body> The date and time now is: <#= DateTime.Now #></body></html> Notice that the template resembles the generated output.
Code Generation and T4 Text Templates
Watch Overview on Channel 9 Text Template Transformation Toolkit (T4) is a template-based code generation engine. It is included with Visual Studio 2008 and available as a download for Visual Studio 2005 in DSL and GAT toolkits. You can use T4 templates to generate Visual Basic, C#, T-SQL, XML or any other text files.

