bennor / AutoT4

A zero-configuration extension for Visual Studio 2012+ which automatically runs your T4 templates at build time.
MIT License
11 stars 14 forks source link

Added the possibility to chose when to run T4 templates (before build, after build, not at all) #7

Closed CosminLazar closed 9 years ago

CosminLazar commented 9 years ago

Hi, In my case I need to run the T4 templates after the build finishes, therefore I implemented it.

Except the actual functionality, there are also some changes in the coding style, if they don't appeal to you, I wont mind if you don't take them in :)

Here's the list of changes implemented here:

Please let me know if you intend to accept this.

Have a great day! Cosmin

CosminLazar commented 9 years ago

Added another commit that migrates the previous RunOnBuild setting.

Since the ProjectItemSettings class is so beautifully generic, I implemented the migration as a coercion in the AutoT4ProjectItemSettings. Let me know of your thoughts.

CosminLazar commented 9 years ago

when it comes to the display name of the enum, I initially tried to get it to work but gave up on it :p Will try to check it out again during the weekend and get back at you if I find something.

bennor commented 9 years ago

Cool. I'm at work now so I'll have a look at this tomorrow (Saturday here).

CosminLazar commented 9 years ago

Spent a bit more time looking to see if the BuildEvent enum values can be exposed with a nice display name in the property page, but I don't think it is supported (you will probably have to convert the RunOnBuild property to a string and handle the display name conversion yourself). Anyway, the "raw" enum values are straightforward and self explanatory. Don't think it pays off to put any more work into this.

CosminLazar commented 9 years ago

Super! Can you also push an update of the extension to the Visual Studio Gallery?