t4.helper's Issues
remove user files
The last commit adds user related files (.suo - soluton options and obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache) to repository. Remove them and add them to .gitignore
file.
Performance Issue
When we are using the CreateNew function with repeatition for various projects as source then the code is performing badly. The reason is because in such case it will get the project details repeatedly without caching it.
There are other reasons though and will be posting them too in upcoming days.
NuGet Package is not updated
Hello,
I've seen that your latest commit was on Apr 18, 2014, however the latest version of the NuGet package was on Saturday, August 11 2012.
Please, could you update the NuGet Package? Thank you.
Specifying BuildAction does not work
I am trying to generate C# code for a separate project using a T4 template that should not be built in the current project and should therefore be included as static content. My template uses
manager.StartNewFile(endpointClassName + ".cs", fileProperties: new FileProperties()
{
BuildAction = BuildAction.Content
});
to start a new file. However, the VS project file properties list Compile
as the selected build action and the project file's XML contains <Compile>
tags.
How is it possible to force TemplateFileManager into setting the build action properly? It obviously ignores the fileProperties
parameter which I consider a bug.
Reverse order?
What is the functional purpose for the line of code files.Reverse();
that reverses the order in which files are created? It's minor, but seems odd that, because of this, the log lists each file in reverse alphabetical order.
T4.TemplateFileManager not working in Visual Studio 2015
Hi,
I am trying to output multiple files in VS2015, this is just not working, VS hangs completely with the "Visual Studio is busy" notification and will not recover.
It seems that everything hands when calling: fileManager.Process();
All the files do get generated as expected however VS just hangs.
Any ideas?
UPDATE:
Its seems the issue happens when files are added to a class library package project, even if I generate these files using a .tt in a separate project with the output to the class library package.
Remove trailing spaces
Please remove the annoying trailing spaces.
You can see them with this extension (https://visualstudiogallery.msdn.microsoft.com/a204e29b-1778-4dae-affd-209bea658a59)
Set-DefaultScaffolder : Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
Package installation is getting failed
Here is the error I am facing..
PM> Install-Package T4Scaffolding.Core.VS2017 -Version 1.0.1
Attempting to gather dependency information for package 'T4Scaffolding.Core.VS2017.1.0.1' with respect to project 'WebApplication18', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 1.96 sec
Attempting to resolve dependencies for package 'T4Scaffolding.Core.VS2017.1.0.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'T4Scaffolding.Core.VS2017.1.0.1'
Resolved actions to install package 'T4Scaffolding.Core.VS2017.1.0.1'
Retrieving package 'T4Scaffolding.Core.VS2017 1.0.1' from 'nuget.org'.
GET https://api.nuget.org/v3-flatcontainer/t4scaffolding.core.vs2017/1.0.1/t4scaffolding.core.vs2017.1.0.1.nupkg
OK https://api.nuget.org/v3-flatcontainer/t4scaffolding.core.vs2017/1.0.1/t4scaffolding.core.vs2017.1.0.1.nupkg 1041ms
Installing T4Scaffolding.Core.VS2017 1.0.1.
Adding package 'T4Scaffolding.Core.VS2017.1.0.1' to folder 'C:\Users\Amit\Documents\Visual Studio 2017\Projects\WebApplication18\packages'
Added package 'T4Scaffolding.Core.VS2017.1.0.1' to folder 'C:\Users\Amit\Documents\Visual Studio 2017\Projects\WebApplication18\packages'
Added package 'T4Scaffolding.Core.VS2017.1.0.1' to 'packages.config'
Executing script file 'C:\Users\Amit\Documents\Visual Studio 2017\Projects\WebApplication18\packages\T4Scaffolding.Core.VS2017.1.0.1\tools\init.ps1'
Set-DefaultScaffolder : Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
At C:\Users\Amit\Documents\Visual Studio 2017\Projects\WebApplication18\packages\T4Scaffolding.Core.VS2017.1.0.1\tools\init.ps1:44 char:9
-
Set-DefaultScaffolder -Name CustomTemplate -Scaffolder T4Scaf ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], COMException
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet
**## Set-DefaultScaffolder : Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
At C:\Users\Amit\Documents\Visual Studio 2017\Projects\WebApplication18\packages\T4Scaffolding.Core.VS2017.1.0.1\tools\init.ps1:45 char:9
-
Set-DefaultScaffolder -Name CustomScaffolder -Scaffolder T4Sc ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [Set-DefaultScaffolder], COMException
- FullyQualifiedErrorId : T4Scaffolding.Cmdlets.SetDefaultScaffolderCmdlet**
Executing script file 'C:\Users\Amit\Documents\Visual Studio 2017\Projects\WebApplication18\packages\T4Scaffolding.Core.VS2017.1.0.1\tools\install.ps1'
Successfully installed 'T4Scaffolding.Core.VS2017 1.0.1' to WebApplication18
Executing nuget actions took 3.18 sec
Time Elapsed: 00:00:05.2765211
Project still maintained
Will this project still be maintained? Last submits were 2 years ago, pull requests open since march...
CanOverwriteExisting or CanOverrideExisting is not working
I am using it in VS2013 and VS2015. And in neither of these environments, these settings do anything.
I mean sometimes they do, but it's like 5% of the time (no rime or reason I can see). Also since I added override to overwrite it closes opened files (generated).
Also can you also clarify, what is the difference between the two?
COM exceptions debugging T4 templates using Template File manager
In visual studio 2012, right click a .tt file > Debug T4 Template using TemplateFilemanager.CS.ttinclude
results in:
RPC_E_SERVERCALL_RETRYLATER Call was rejected by callee
vs 2017
Hi will this work in 2017
FindFolderByName issue, if folder is more than once in the same project
Is there any other way to find the correct position of my current folder, where the .tt files exists?
I have a large folder structure in my project. The method FindFolderByName
just consider the First() Item in the same project, if there are more than one ProjectItems. But this must not be the correct folder:
projectA
folder1
folder1-1
folder2
folder1-1
template.tt
StartNewFile("AdditionalsFile.cs"), "projectA", "folder1-1");
With this constellation the additional file will be generated in the first folder1-1
and not in the folder where the template is.
The method FindFolderByName
should be more precise to find the correct folder. Maybe with a more specific folderName
parameter in the StartNewFile
method.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.