I need to know how to disable the autorun feature for t4 templates in Visual Studio 2012.
(In case you did not know, Visual Studio will autorun all t4 templates as soon they are changed and saved in the IDE.)
I want to only run the templates only when I choose > Build, > Transform All Templates.
(I know that I can manually clear the CustomTool property and then fill it in again when I need to run them-- but that is not a feasible solution for use becuase it is a manual process, it is error prone, it requires excessive work to turn on and turn off,
we use t4 in a lot of different projects, etc, etc.)
Do you know of a way to turn off the autorun, automatic transformation, of t4 templates in Visual Studio?
This is not an add-in or extension or anything like that.
The behaviour (to auto-run/auto-transform a t4 template every time that the t4 template is changed and saved) is intrinsic default behaviour in Visual Studio 2012-- that is the "standard" way that Visual Studio handles such things.
The problem is that if there are a lot of templates, and if the templates each take 10-20 seconds to run, and if one is doing a lot of changes to the t4 templates during a development/testing cycle, and etc-- then it take a LONG time to wait for Visual Studio
to transform the t4 templates after each and every save.
I would like to be able to switch this back-and-forth from "manual transform mode" and "auto transform mode", but it appears the Visual Studio is not that smart (yet)-- unless someone has a workaround.
As you said above, to disable T4 template auto-run in Visual Studio 2012, we could delete TextTemplatingFileGenerator under "Custom Tool" in the file's Properties while we edit it, and then fill it in again.
mkamoski2
I would like to be able to switch this back-and-forth from "manual transform mode" and "auto transform mode", but it appears the Visual Studio is not that smart (yet)--
mkamoski2
Member
31 Points
54 Posts
how to disable the autorun feature for t4 templates in Visual Studio 2012
Feb 19, 2013 06:16 PM|LINK
Dear Developers --
Please help.
I need to know how to disable the autorun feature for t4 templates in Visual Studio 2012.
(In case you did not know, Visual Studio will autorun all t4 templates as soon they are changed and saved in the IDE.)
I want to only run the templates only when I choose > Build, > Transform All Templates.
(I know that I can manually clear the CustomTool property and then fill it in again when I need to run them-- but that is not a feasible solution for use becuase it is a manual process, it is error prone, it requires excessive work to turn on and turn off, we use t4 in a lot of different projects, etc, etc.)
Do you know of a way to turn off the autorun, automatic transformation, of t4 templates in Visual Studio?
Please advise.
Thanks.
-- Mark Kamoski
ToughMan
Participant
1490 Points
635 Posts
Re: how to disable the autorun feature for t4 templates in Visual Studio 2012
Feb 20, 2013 02:22 AM|LINK
If that's an Add-in, plz just remove it from Vs
mkamoski2
Member
31 Points
54 Posts
Re: how to disable the autorun feature for t4 templates in Visual Studio 2012
Feb 20, 2013 01:49 PM|LINK
This is not an add-in or extension or anything like that.
The behaviour (to auto-run/auto-transform a t4 template every time that the t4 template is changed and saved) is intrinsic default behaviour in Visual Studio 2012-- that is the "standard" way that Visual Studio handles such things.
The problem is that if there are a lot of templates, and if the templates each take 10-20 seconds to run, and if one is doing a lot of changes to the t4 templates during a development/testing cycle, and etc-- then it take a LONG time to wait for Visual Studio to transform the t4 templates after each and every save.
I would like to be able to switch this back-and-forth from "manual transform mode" and "auto transform mode", but it appears the Visual Studio is not that smart (yet)-- unless someone has a workaround.
What do you think?
Please advise.
Thanks.
-- Mark Kamoski
Angie xu - M...
All-Star
18453 Points
1563 Posts
Microsoft
Re: how to disable the autorun feature for t4 templates in Visual Studio 2012
Feb 26, 2013 05:00 AM|LINK
Hi mkamoski
As you said above, to disable T4 template auto-run in Visual Studio 2012, we could delete TextTemplatingFileGenerator under "Custom Tool" in the file's Properties while we edit it, and then fill it in again.
I think you could consider submitting idea to Visual Studio 2012 Feedback(https://connect.microsoft.com/VisualStudio),
Microsoft engineers will evaluate this issue seriously, and they will give positive response for this. Thanks
With regards
Feedback to us
Develop and promote your apps in Windows Store
mkamoski2
Member
31 Points
54 Posts
Re: how to disable the autorun feature for t4 templates in Visual Studio 2012
Feb 26, 2013 01:27 PM|LINK
Dear Angie --
To send a wish-list idea to the Visual Studio IDE Development Team was a good idea.
I appreciate that you mentioned it.
Now they have the suggestion.
Thanks.
-- Mark Kamoski