t4

How can I automate the t4 code generation for SubSonic

Hi all, I'm using SubSonic 3 (ActiveRecord mode) to generate the code for my DAL. It uses T4 templates (.tt) files that as soon as you save, generate the code for you. I want to automate this as part of my NANT build, but I can't get this to work. I know that MS provide a tool called TextTransform to generate the code from T4 templates...

Subsonic 3.0 LINQ Templates with Multiple Databases

I'm evaluating SubSonic 3.0 for use in our business as a replacement for our POCO objects. I'm new to SubSonic, literally installing it yesterday. I've gotten to the point where I can connect to one database using the 3.0 LINQ T4 Templates, and have been wooed by the promise of being able to connect to multiple databases in one applica...

Can you do a RunCustomTool with EnvDTE as a pre-build event?

I am using T4MVC, and I can't use a pre-build event to run TextTransform.exe as it relies on EnvDTE, and must be run with Visual Studio as host. If I have run custom tool once, it works nicely because it marks itself dirty when its executed (AlwaysKeepTemplateDirty = true), but when you open the solution, it doesn't run on build, so I w...

Engineering techniques to diminish MVVM Driven Development time?

Hi Currently we just start releasing modules for a big project in MVVM but seems like the deliverables are starting to encounter a slowness with this model, such things as the learning curve effort and the fact that mvvm do requires a bit more code than other patterns, What Programming and software engineering techniques do you employ or...

Can C++ projects use T4 in Visual Studio 2010?

T4 did not work for C++ projects in Visual Studio 2008 since it did not use msbuild for C++ projects. (Yes there were workarounds) In Visual Studio 2010, C++ projects uses MsBuild, so do anyone know if C++ projects can use T4 in the same way as C# or VB? ...

Installing Tangible T4 Editor in VS 2010 RC

I installed the (free) Tangible T4 Editor from the VS Gallery, and shut down/restarted VS. I run on XP under an Administrator account. VS Extension Manager indicates that the editor is installed and enabled. Here is my problem: When I do Add New Item (as in the video here), I don't see any of the Tangible templates. What have I missed? ...

Copy comments with T4 template

I'm generating a class from an interface using T4 templates, and I want to be able to copy xml-comments from the interface to the class methods. Is it possible and if yes, how? In my template I am just taking the interface methods and copying them like this: foreach(var m in typeof(IFrontEndService).GetMethods()) { <#= "Some out...

How to map Stored Procedures with EF4 ?

Is it possible to map stored procédures whit EF 4 using T4 templates ? I have searched and I conclude that it is not possible yet. It exist some methods like Edm.SourceComplexTypes(), Edm.SourceAssociations(), Edm.SourceEntities() but nothing about stored procedures ... Someone have any answer ? Thanks. ...

is there any resources how to learn visual studio T4 templates so i can start generate my own code

i wanted to learn about T4 templates but i need a resource to read about them. so anyone knows any blogs or tutorials about T4 templates? thanks ...

Using T4 templates to add custom code to EF4 generated entities?

I am getting started with Entity Framework 4, using model-first development. I am building a simple WPF demo app to learn the framework. My app has two entities, Topic and Note. A Topic is a discussion topic; it has Title, Text, and DateRevised properties. Topic also has a Notes collection property. a Note has DateCreated and Text proper...

Setting a breakpoint in a T4 template

I'm trying to debug the execution of a T4 template in Visual Studio 2008. All the information I'm finding on debugging T4 templates in Visual Studio 2008 say that you can set a breakpoint (red dot) in the template as if it were a regular code file. I have the Clarius T4 code highlighter installed, so my T4 template is colored, but I ca...

Does Visual Studio 2008 Express support t4?

I'm trying to use T4MVC in Visual Web Developer 2008 Express Edition and it's not building any files. Is T4 supported in the express editions? ...

Visual Studio T4 vs CodeSmith

I've been using CodeSmith for the past 2 years and love what it does for me. However, I also know about T4 which is built in to Visual Studio and can do some pretty cool stuff too. Based on conversations with friends T4 in VS2010 T4 is going to be even better. So the question is: do I keep riding the CodeSmith bus or is it time to s...

Transforming TT files in MsBuild

I need to build a DSL Solution using MsBuild and want to be able to transform the TT files, I have tried the guide on http://msdn.microsoft.com/en-us/library/ee847423(VS.100).aspx but I am getting the following errors: Failed to resolve include text for file:{0} and also Loading the include file '{0}' returned a null or empty...

TextTemplatingFileGenerator not found

Hi guys, Im using vs 2008 sp1 but somehow the TextTemplatingFileGenerator for t4 is missing when I run custom tool. I tried to repair and reinstall the vs 2008 but could not make it work. Do you guys have any ideas to get it back? ...

What is purpose of T4 Generator in T4toolbox

I am using T4toolbox, I am confused what the generator is for. I can run the following public class Generator1 : Generator { protected override void RunCore() { Template1 t = new Template1(); t.Output.File = "t3.txt"; t.Render(); } } or I can run t4 script directly like the following. Template1...

how not to output default T4 generated file

I am using T4toolbox to generate a bunch of files, let's say my t4 file name is x.t4, but default it generate a x.txt, which has nothing inside, can I tell t4 engine not to do this? ...

What are the ramifications of using System.Reflection.Assembly.Load(System.IO.File.ReadAllBytes(path)) in T4?

System.Reflection.Assembly.Load(System.IO.File.ReadAllBytes(path)) So this is a work around to not being able to use T4 to reflect or read other files in the project or solution without locking the binaries from this post. The comments imply a memory issue. The comments talk about a no-unloading downside, would this be garbage collect...

Generate Enum from Values present in a table using ADO.NET Entity framework

My requirement is to create an Enum based on values present in a table from DB. I am using ADO.NET Entity Framework model (.edmx file), Can any one of you help me out... Thanks, Vinni ...

.NET Code Generataion | Unable to create a T4 template in Visual Studio 2008

I've the Visual Studio 2008 installed on my machine(licensed one). When I try to add a new .tt(say bar.tt) file to the project, the following code is generated: I've seen in a screencast, where in an empty .tt file should be opened and the developer enters the T4 code. Even if I remove the code and enter T4 code, am getting build error...