t4 Questions

3

Solved

I can't seem to find a way to make T4 templates in VS 2015 RTM, in an ASP.NET 5 (vNext) project. I even installed the T4 toolbox for Visual Studio 2015 extension, but the tt templates are not tran...

1

Solved

I just tried to open one of my projects with Visual Studio 2015 the first time, and it says: The importede project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TextTemplating\Mic...
Regale asked 29/11, 2015 at 11:18

3

Solved

When using T4 to generate C# code, I can't get correct identation with TABS scattered around: public partial class Foo : Base { public int C { get; set; } [MappedProperty("A.B[{C}].Foo")] publi...
Berthaberthe asked 3/11, 2015 at 14:5

1

Our Solution is currently based on Entity Framework Database First. We have a T4 Template that generates repository classes from the EDMX. We are reviewing our planned approach for releasing chan...

2

Solved

I have a T4 template that is used with the TextTemplatingFilePreprocessor to generate a class that I can then use to generate the output of the template. At the start of the T4 template I import s...
Jacquelynejacquelynn asked 21/9, 2011 at 1:14

3

Solved

Is there a way to do reflection pre-compile - at design time? My intent is to use T4 to spit out custom codes based on classes that implement certain interfaces. I know I can call upon reflection,...
Samson asked 3/1, 2013 at 6:23

3

Solved

I've recently asked about C# classes to T4 viewmodels, but this is different so I separated it out into a second question I'd like to automate the generate of a client library in typescript ...
Avalos asked 17/10, 2013 at 21:37

4

Solved

I'm using VisualStudio Ultimate 2012 (Update 1) on Windows 7. I can get my T4 template to generate a file by: right click [tt file] | run Custom tool. That works great! (yay for me). It also works ...
Highroad asked 18/1, 2013 at 23:35

1

Solved

After pulling a project from source control down to a new dev machine with VS 2013 I found I could no longer generate my Client side proxy and entity classes (from the .tt file created by "OData Cl...
Calc asked 28/7, 2015 at 14:21

4

Solved

Does anybody know, in a .tt file, where code.VsNamespaceSuggestion() gets its namespace from? I'm having an issue where I had to change a solution's namespace, and I swear I've changed it everywh...
Twentyfour asked 10/5, 2011 at 16:14

2

Solved

I have the need to do JSON schema generation within a T4 template, and found Newtonsoft's new Schema class more than adequate for the purpose at hand (within a console application, tested), however...
Artemis asked 24/6, 2015 at 6:52

4

I want to generate a fragment using T4 but after adding a .tt file to the Wix project there is no "Custom Tool" option for this file. And there is no menu item "Run custom tool" when right clicking...
Advised asked 1/9, 2010 at 16:34

1

Solved

Currently , I am developing a framework , I want to add custom scaffolding option in visual studio menu. By default "MVC5 Controller with views, using Entity Framework" option 3 from the dialog ...

2

Solved

Previously, with Visual Studio 2012, I was able to bring the CodeTemplates folder up to my project directory and then modify the existing T4 templates or add entirely new T4 templates to meet my pa...
Cognac asked 13/8, 2013 at 1:54

4

I cant figure out how to include the resource file (.resx) in the (.tt) T4 template. I tried so far... Importing the namespace <#@ import namespace="T4TemplateResources.resx" #> Also in...
Nigh asked 8/4, 2013 at 17:32

6

I'm trying to wireup some code gen templates to my team's automated build process. Our SCM team doesn't want Visual Studio on our build machine (which I have a hard time arguing with). Is there a ...
Mernamero asked 10/6, 2009 at 21:37

3

Solved

It's been a while since I last used T4 and this is probably a silly question... Is it possible to reference an arbitrary assembly from a template? Example: I have a class that I'd like to use in P...
Loess asked 13/7, 2010 at 21:46

3

Solved

I look and I don't see. I have a solution with two projects -- project A (a library) and project B, which is main project and contains T4 text template. What I did so far -- I added a reference ...
Resupinate asked 1/6, 2011 at 9:52

3

I am trying to setup a process where my T4 templates will be transformed on the build server (Visual Studio is not installed there). I've read all online references, but could not get a clear sour...
Vachill asked 24/5, 2012 at 12:14

4

I have a website project in Visual Studio and I'm trying to reference some assemblies from the bin directory of the site. So far, the rooted path is the only one that works: <#@ Assembly Name=...
Mugger asked 25/7, 2013 at 14:33

1

Solved

No matter what method is used to specify a file in an assembly directive the T4 engine cannot find the file specified. <#@ assembly name="$(SolutionDir)packages\TestPackage\lib\net45\Test.dll"#...
Monition asked 22/1, 2015 at 4:0

3

I have overridden the controller generation T4 templates (ControllerWithContext.tt) as described here. I would like to take advantage of the code helper utilities found in EF.utility.CS.ttinclude a...
Delwyn asked 10/11, 2011 at 11:33

2

Solved

I need to reference a Type in one of the assemblies referenced by the project containing my Visual Studio T4 template. However, the referenced assembly is installed from a NuGet package. As that Nu...
Ribbonwood asked 24/10, 2014 at 20:53

0

I'm having difficulties with T4 transforming on build (with MsBuild). I'm trying to get generated files to the solution/project. If I just save or run custom tool, files are generated, and added t...
Horologium asked 26/10, 2014 at 19:42

1

I have a .tt script that needs to reference a couple of external assemblies. Is it possible for the T4 host to automatically include the assemblies referenced in the project - rather than me manua...
Yah asked 23/9, 2014 at 8:14

© 2022 - 2024 — McMap. All rights reserved.