t4 Questions
3
Solved
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 p...
Zuzana asked 18/10, 2009 at 0:56
1
I have an issue in "CallContext.LogicalGetData" method using .net Core when i try to send parameter to runtime text template t4 (net core)
Below tt file :
<#@ template language="C#" #>
<...
Anabantid asked 27/3, 2020 at 17:1
1
I have several legacy components written in C/C++ and would like to wrap them into the Nuget package and use this package from C# code.
What is the best way to actually wrap C++ code in nuget packa...
Trevatrevah asked 3/8, 2016 at 10:23
7
Solved
When trying out these tutorials (T4 Tutorial: Creating reusable code generation templates) I noticed that although I was using plain c# I didn't get any intellisense, probably because of the file e...
Trujillo asked 7/1, 2009 at 15:39
3
Solved
I'm using EnvDTE to do some code generation within my T4 Templates.
I have the code working correctly in Visual Studio 2010, however I've just started using Visual Studio 2012 and now when I try ...
April asked 29/8, 2012 at 10:36
6
Solved
When I edit T4, the script is executed every time I switch to another file. It is OK for quick simple scripts, but some scripts take long time to execute. Is there a way to disable this behavior? I...
Phospholipide asked 27/10, 2010 at 15:24
5
Solved
I'm creating a NuGet package the provides a client for my WebAPI project by reflecting over the ApiControllers and creating classes for each one with methods that correspond to the actions defined ...
4
Solved
We're trying to use T4 with Visual Studio 2010 (SP1) to build scripts for another language that are based upon some of our existing C# classes. I'm hoping for the following:
The template needs to...
Coble asked 4/5, 2011 at 16:49
6
Solved
I am splitting T4 code in separate files for modularity and reuse but I am finding out that each file costs me an empty line in output. For example:
<#@ template debug="false" hostspecific="fal...
Mccabe asked 7/5, 2012 at 8:13
2
I am using MSBuild to generate some files using T4 and I was wondering if it would be possible to reference and use MSBuild properties within the T4 template?
I want to do something like this snip...
Calfskin asked 28/7, 2011 at 15:7
0
I'm attempting to create a Custom Scaffold Extension for .NET Framework and Visual Studio 2019. I do not want to overwrite the default MVC T4 templates. I'm trying to do something like:
https://m...
Ovenware asked 26/4, 2020 at 17:38
3
Solved
I've written a T4 template where I instantiate an EF context to read some data.
The problem is that the context cannot see the connection string from the Web.config.
How can I make the connection ...
Trapes asked 23/8, 2014 at 9:12
9
Anyone having similar problem, while creating webservices?
Compiling transformation: Metadata file 'D:\Program
Files\VS2013\Common7\Tools..\IDE\Microsoft.Data.Entity.Design.dll'
could not be f...
Razor asked 29/10, 2013 at 17:10
1
We're currently migrating a project from .NET Framework to .NET Core 3.1 and we have a problem getting some of our T4 templates to work. These templates import one or more assemblies from our solut...
Eternity asked 10/2, 2020 at 15:48
4
Solved
T4 template files are automatically recognizable by the IDE under C# projects, but I have no clue on how they can be integrated into C++ projects (other than using make files).
Any ideas?
Higgledypiggledy asked 30/1, 2009 at 16:42
6
I am building a plug-in in VS 2010 and I get stuck at the T4 generation.
Right now I have implemented (like MSDN suggests) a custom T4 host to generate my T4 results and I use it in this way:
con...
Aekerly asked 9/12, 2010 at 19:0
3
Solved
I'm using the POCO t4 template generator that comes with VS 2012. I made few changes to include the Entity.Name, but I'm not able to figure out the primary key.
public string EntityClassOpening(En...
Flagship asked 27/12, 2012 at 23:34
5
Solved
When I needed to generate some C# code, for example DTO classes from xsd schema, or an excel table, I've used some roslyn API's.
Is there something simmilar for typescript?
[EDIT]: I've end up usin...
Expound asked 4/4, 2016 at 15:43
2
When I provide an object to a T4 template with nullable properties, unless I explicitly write <#= obj.Property ?? string.Empty #> the ToStringWithCulture(object objectToConvert) method that i...
Jacobba asked 14/5, 2015 at 15:43
2
Solved
I migrated a project.json/.xproj project to the newer CS2017 .csproj format.
The project contains a T4 (.tt) template file.
It doesn't regenerate its output on save or build. The output .cs file ...
Vickyvico asked 22/3, 2017 at 22:2
3
Solved
I tried to follow this tutorial: http://t4-editor.tangible-engineering.com/blog/how-to-generate-multiple-output-files-from-a-single-t4-template.html
with visual studio 2015 (.Net 4.5)
Sample proj...
Doordie asked 6/11, 2015 at 20:44
8
Solved
How can I resolve these errors:
Loading the include file 'EF.Utility.CS.ttinclude' returned a null or empty string.
Value does not fall within the expected range.
Tools Used: VS 2012, Entity F...
Fiddlewood asked 21/2, 2013 at 10:14
4
Solved
When I build my c# solution the .tt files will not create the .cs file outputs. But if I right click the .tt files one at a time in solution explorer and select "Run Custom Tool" the .cs is generat...
Height asked 1/1, 2009 at 22:15
2
I have come across a scenerio that to customize DataAnnotations in Dynamic Data Web Application. This is the scenerio:
[Display(Name="DispName")]
public string DName{get;set;}
Instead of hardcod...
Nevadanevai asked 20/5, 2013 at 7:12
4
Solved
In Visual Studio 2015, I'm using the NuGet package Unofficial.Microsoft.VisualStudio.TextTemplating.14.0.0 which allows me to transform T4 templates directly from MSBuild, whenever a project is bui...
Inwardly asked 8/3, 2017 at 2:42
© 2022 - 2024 — McMap. All rights reserved.