t4-toolbox

T4 Toolbox problems

I downloaded and installed the latest version of the T4 Toolbox for VIsual Studio 2010, in an attempt to create LINQ business objects, but I'm having some troubles with it. First, I was getting errors saying it couldn't find T4Toolbox.tt and T4Toolbox\LinqtoSql.tt in my project directory, but that's not where they are installed. Am I to...

T4 Toolbox: How do I modify a pre-built template?

I'm using the T4 toolbox's Linq to SQL model to generate code, and I'd like to add some serialization properties to the code that it generates. I'm not sure how to modify the generator to do this. Would I modify the actual .tt file that is installed with the toolbox? Or can I add something to the .tt file that gets created for me? Or do ...

T4 Toolbox Linq to SQL Model: Association null after WCF call

I'm using the T4 toolbox Linq to SQL generator, and after making a WCF call, the association properties on my object are null and throwing a null reference exception in their setters. This is one such property: [DataMember(Order = 4, EmitDefaultValue = false)] [Association(Name = "Family_FamilyConfiguration", Storage = "familyConfigurat...

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...

T4 Toolbox - mixing class feature and statement blocks

I'm a T4 newbie trying to use T4 Toolbox to generate F# code based on this answer, but it seems that class feature blocks can't be mixed with statement blocks. Here's my code: <#@ template language="C#" hostspecific="True" debug="True" #> <#@ output extension="txt" #> <#@ include file="T4Toolbox.tt" #> <# FSharpTemplate template = n...

T4 Toolbox - Referencing Class in Current Assembly

Can anyone help me - I need to reference a class in one of my T4 Toolbox scripts that resides in the same assembly as the script. Basically I want to reflect over certain classes and do some code generation on them. The problem is that nothing gets generated and I get errors telling me the class in my current project cannot be accessed....