t4

Compile error using SubSonic ActiveRecord templates in Visual Web Developer Express

Thanks to ranomore I was able to get the Subsonic T4 code generation to work in Visual Web Developer Express for my ASP.Net MVC project, however only using the LinqTemplates. When I use the ActiveRecord templates with the same settings my project does generate files, but the code doesn't compile anymore... Any ideas? ...

T4 Templates - SubSonic 3 - Running at Build Time

How do you get the SubSonic 3 T4 templates to rerun prior to building in VS2008? I don't have to continually "Run Custom Tool" on each one? ...

Distributing microsoft.visualstudio.texttemplating.dll with custom app

We are writing an app that will use T4 to generate Flex/Actionscript to compile into SWF. We would like to distribute this app to users who will not have VS. I've searched and searched and could not find any info anywhere on redistributing microsoft.visualstudio.texttemplating.dll with your apps, except on this code plex project (http://...

Get Project or Relative Directory with T4

How can I get a reference to the directory of the visual studio project or solution or the directory of the t4 template from within a t4 template? I have a template that concatenates a number of files together which are located relative to the template. I need to get a reference to there absolute location through a relative means. Hard ...

Visual Studio + Subsonic 3 + Multiple Projects + "transform all templates" problems

I am using Visual Studio + Subsonic 3 + Multiple Projects + T4 Templates + "transform all templates" and I have two projects each with their own DB and associated activerecord.tt files etc. Then I right click each tt file in select run custom tool - all is OK BUT when I click on "transform all templates" all hell breaks lose with we...

How can I use T4 templating with MonoDevelop 2.2 on OSX

I understand MonoDevelop supports MVC and uses an implementation of T4 to generate code. Is there a way to utilize T4 with my own templates? I am using MonoDevelop 2.2 Alpha (MonoTouch preview builds) on OSX Snow Leopard. Mono 2.4.2.3 is also installed (which is required for the MonoTouch preview builds). I have created a very simple...

T4 Template to generate first cut of GUI (aspx) derived from database?

I'm wondering if anyone has come across any existing T4 templates to reverse engineer a database into a first cut at an ASPX GUI. It would be nice to be able to design your database, run it through a code generator for the data access layer, but also generate a simple GUI. As a simple example, for each table in the database, create som...

Change Default MsTest Unit Test Wizard Template

My team is using the unit test wizard, but has found the amount of cruft generated annoying. Is there anyway to modify this template? Thanks ...

How can I specify T4 (Text Templates) to use C# 4.0, in VS2010?

I need to specify my T4 to use C# 4.0, to render my tt files? I tried using <#@ template language="C#v4.0" debug="true" #> But when I use a dynamic variable, like this dynamic x=10; Write(x.ToString()); I'm getting these errors Error 2 Compiling transformation: Predefined type 'Microsoft.CSharp.RuntimeBinder.CSharpSetMemberBind...

How do I refresh the SubSonic T4 Template generated code?

I've just started using SubSonic 3 and I'm using the ActiveRecord T4 template. If I make a change in the database (add a column to a table for example), what is the correct method for forcing the code produced by the T4 templates to be re-generated? At the moment I'm just deleting the ActiveRecord folder in my project then dragging the...

Auto-generate an application facade from appsettings

Here's the question first: Is this possible? I'm taking my inspiration from Joe Wrobel's work (a redux of the forgotten Codeplex project). Here, you do your work on creating your profile for the provider, and it does the legwork of creating the strong typing for it, effectively creating a facade for the Profile class. And now the back ...

Can I use T4 programmatically from C# ?

I am writing software that produces C# code. Mostly I am using StringTemplate and StringBuilder. Is there any way to use T4 templates direct from my code? ...

How to force Visual Studio 2008 to regenerate code from T4 templates when an XML file changes?

I'm generating quite a bit of code from a single XML file, but the templates are organized in two different T4 templates. Whenever I change the XML file, I have to remember to open the two *.tt files, change them trivially (add / delete a space) and save them again to make sure the code is generated. This can't be the right way to do it...

Get Visual Studio to run a T4 Template on every build

How do I get a T4 template to generate its output on every build? As it is now, it only regenerates it when I make a change to the template. I have found other questions similar to this: http://stackoverflow.com/questions/1293320/t4-transformation-and-build-order-in-visual-studio (unanswered) http://stackoverflow.com/questions/405560...

Spark T4 templates for ASP.NET MVC

I was just curious if any Spark T4 templates already exist that match/are similar to the out of the box web forms view templates (create, edit, details, etc...). My Google skills didn't lead me to any results. ...

TextTransform.exe seems to only accept an older version of C#

When I expand T4 templates inside Visual Studio, I can use the full C# 3.0 syntax, including LINQ expressions, etc. When I expand it outside Visual Studio using TextTransform.exe it complains about LINQ expressions and other new features of C# 3.0. Is there a newer version of TextTransform.exe? The one I'm running is in: C:\Program F...

Simple & Practical C# code generation (VS 2008 or 2010)

I've put off using generated code as part of the build process for fear of the complexity it introduces into the build process. Is there a simple way to integrate build-time generated code into an app? The kind of code I'm thinking of is similar to the resource and settings file code generation that Visual studio performs: Having int...

T4 Controller Template to trigger View Generation

I have been using some customized MVC templates that really improve my productivity. However, I would like to take it to the next level. I generate a controller template for each table in my app. The controller has Edit, List, Details, and Delete actions. What I would like to do, is at the same time trigger the generation of the view...

What is the requires/provides design pattern used by the T4 RequiresProvidesDirectiveProcessor class?

The MSDN Library documentation for the RequiresProvidesDirectiveProcessor class in the Microsoft.VisualStudio.TextTemplating namespace refers to a design pattern called "requires/provides". What is this design pattern? "The abstract base class for a directive processor that defines and implements a design pattern called requires/...

With T4 templates, does it give you the database as an object where you can spit out code?

With T4 templates, does it give you the database as an object where you can spit out code? or do you need that tool visualt4? ...