12
votes

Just trying to generate POCO objects, context etc for an existing database by using the EF Power Tools Beta 2 "Reverse Engineer Code First" facility.

I'm using VS2012 Ultimate with Update 1, on Windows 7 64 bit.

I point it at my existing database and hit OK. I get the following error in my Build Output window:

One or more errors occurred while processing template 'Entity.tt'. C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude(1,4) : error : A processor named 'T4VSHost' could not be found for the directive named 'CleanupBehavior'. The transformation will not be run. The following Exception was thrown: System.InvalidOperationException: Cannot find processor for directive 'T4VSHost'. at Microsoft.DbContextPackage.Utilities.EfTextTemplateHost.Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.ResolveDirectiveProcessor(String processorName) at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, IEnumerable`1 directivesToBeProcessed)

Any ideas?

3
Did you uninstall the Update by any change? I saw something like this because VS Update was installed. The fix was to repair VS. - Pawel
No, but I have further news. I tried it on my home PC when I got in. That is running Windows 8 64 bit, Visual Studio 2012 Ultimate. BUT WITH NO UPDATE 1. I tried the reverse engineer without the Update 1 and it was fine. Installed VS2012 Update 1 and BANG same error. So it definitely looks to be caused by Update 1. - Paul

3 Answers

22
votes

Looks like it is a confirmed issue with Entity framework and Visual Studio 2012 update 1

The link does currently contain 2 work arounds

9
votes

This is a legitimate issue on the EF Power Tools, but it's not related to the CTP issue, which was resolved in the final VS Update release. A fix for the EF Power Tools is in the works.

David Obando

Entity Framework Team

0
votes

i also hit this same problem. The culprit was a package called Entity Framework Power Tool Beta 3. Updated this and everything was back to normal.