Power Tools: Reverse engineer does not honor registered T4 processors


The VS and command line hosts for the T4 processor allow registering custom directives that can be processed by types registered under HKLM\Software\Microsoft\VisualStudio\$(shellversion)\TextTemplating\DirectiveProcessors (found under HKLM\Software\Wow6432Node in 64 bit machines).

Apparently the way we run T4 templates in the EF PowerTools, e.g. for reverse engineering of a database into Code First classes does not honor registered processors. This could affect any directive either we add in our .ttinclude files or any directive that customers using custom templates want to add.


ajcvickers wrote Oct 30, 2012 at 5:30 PM

This will probably get done in One EF.

BriceLambson wrote Dec 13, 2012 at 6:32 PM

A one-off fix for the CleanupBehavior directive was committed by DavidObando on Nov 29, 2012. Commit e0a18055c830.

jmanning wrote Dec 13, 2012 at 8:28 PM

Any chance an updated vsix of the power tools can make it out to the extension feed?

Reverse engineer fails for multiple users (see the VS gallery page) after installing VS 2012 Update 1, and building/installing a vsix from current repo source works great (I guess due to one-off fix for CleanupBehavior from David that Brice mentioned?)


BriceLambson wrote Dec 17, 2012 at 4:30 PM

@jmanning, Yes, we're working on getting the current bits published to the VS gallery. Until then, Rowan has documented a workaround in the Beta 2 post's comments on our blog: http://blogs.msdn.com/b/adonet/archive/2012/04/09/ef-power-tools-beta-2-available.aspx#10374587

RoMiller wrote Jan 21, 2013 at 4:33 PM

Moving back to proposed per Brice's suggestion
The underlying bug here hasn’t actually been fixed. We only hacked around the one that was breaking our default templates. If the user customizes their .tt files and adds any other custom directive, we will still break. I recommend re-opening this bug since it will need to fixed as part of the OneEF feature if we use the existing Power Tools code.