Exclude T4Template-generated files from source control

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
rpldcox
Posts: 4
Joined: Fri Mar 20, 2009 3:40 am

Exclude T4Template-generated files from source control

Post by rpldcox » Sat Sep 03, 2016 9:24 am

In preparation for upgrading, I am evaluating Vault 9 using the Vault Standard Client version 9.1.0 (584) and Visual Studio is set to use the Standard Classic Client.

TL;DR: I can't exclude the files generated by T4 Templates from source control. The menu option doesn't appear.

Long version: In previous versions of Vault, I excluded the output files from T4 Templates (that is, the .cs files which were generated from the .tt files) by selected the .cs output in Solution Explorer and using the menu option File | Source Control | 'Exclude from source control'. In version 9 the menu option no longer appears for the output files. (It does appear for the template files and pretty much all other files, however.)

So we are stuck with storing the generated files in source control.

Is this behaviour intentional?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Exclude T4Template-generated files from source control

Post by Beth » Tue Sep 06, 2016 1:47 pm

I still see the Exclude From Source Control option in the File - Source Control menu. Are you checking under the File menu or the right-click menu?

What type of project is this?

Is the solution file in Vault and bound?
Beth Kieler
SourceGear Technical Support

rpldcox
Posts: 4
Joined: Fri Mar 20, 2009 3:40 am

Re: Exclude T4Template-generated files from source control

Post by rpldcox » Thu Sep 08, 2016 4:25 am

Hi Beth,

Thanks for your reply.
Beth wrote:I still see the Exclude From Source Control option in the File - Source Control menu. Are you checking under the File menu or the right-click menu?
Under the File menu.
Beth wrote:What type of project is this?
It happens in an ASP.NET Web Application and a C# Class Library.
Beth wrote:Is the solution file in Vault and bound?
Yes it is.

The project was originally created in VS2013 and imported into VS2015. I will try creating a new project in 2015 in a new solution and see what happens there.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Exclude T4Template-generated files from source control

Post by Beth » Fri Sep 09, 2016 4:09 pm

The Exclude From Source Control is not available for websites that are not source controlling the .sln. If you have a web application though, that has the exclude under the file menu.
Beth Kieler
SourceGear Technical Support

rpldcox
Posts: 4
Joined: Fri Mar 20, 2009 3:40 am

Re: Exclude T4Template-generated files from source control

Post by rpldcox » Mon Oct 31, 2016 6:05 am

Sorry for the delay in following this up.

I have created a brand new solution containing a single Console app. project. I added a new Text Template and set the output extension to '.cs'. I can exclude the '.tt' file from Source Control, but not the output file ('.cs').

Screen shot taken when the .tt file is selected:
T4TemplateProblemScreenShot-TT.png
Screen shot taken when .tt file is selected
T4TemplateProblemScreenShot-TT.png (228.3 KiB) Viewed 7249 times
Screen shot taken when .CS file is selected:
T4TemplateProblemScreenShot-CS.png
Screen shot taken when .CS file is selected.
T4TemplateProblemScreenShot-CS.png (221.43 KiB) Viewed 7249 times
This is not a web application, so I think your last comment will not apply.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Exclude T4Template-generated files from source control

Post by Beth » Thu Nov 03, 2016 1:43 pm

but not the output file
Thanks. That was the key for reproducing the issue. I will get a bug logged for the developers. I haven't found a way around the issue yet.


F: 19682
Beth Kieler
SourceGear Technical Support

Post Reply