EntityFramework Bug in VS2012 Update 1 CTP - by Roman_Ranzmaier

Status : 


Sign in
to vote
ID 769934 Comments
Status Active Workarounds
Type Bug Repros 16
Opened 11/2/2012 3:19:07 PM
Access Restriction Public


I updated to VS2012 update1 CTP

And now If i try to Add an Entity Framework Model to a solution I get always the same exception during build.
The bug also happen on an empty model. tested on my Workstation and my notebook

Error	1	An Exception was thrown while processing a directive named 'CleanupBehavior'. The transformation will not be run.  The following Exception was thrown:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Microsoft.VisualStudio.TextTemplating.VSHost.Directives.CleanupBehavior.ProcessDirective(String directiveName, IDictionary`2 arguments)
   at Microsoft.VisualStudio.TextTemplating.VSHost.Directives.T4VSHostProcessor.ProcessDirective(String directiveName, IDictionary`2 arguments)
   at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, IEnumerable`1 directivesToBeProcessed)	C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude	1	4	
Sign in to post a comment.
Posted by Microsoft on 5/2/2014 at 2:48 PM

This issue has been resolved in Visual Studio 2012 Update 4.

This update can be downloaded from the following location: http://www.microsoft.com/en-us/download/details.aspx?id=39305

Please let us know if applying this update does not resolve this issue.

Erica Mohler
Microsoft Program Manager
Posted by Microsoft on 4/8/2013 at 3:20 PM

Do you have an isolated repro of this issue?

As well, can you please help us with the following questions:
1. Can you confirm that your machine contains either of the following registry keys?
    a.    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\TextTemplating\DirectiveProcessors\T4VSHost.
    b. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\

2. Can you provide us with the version of the following 2 assemblies:
     a. C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Microsoft.Data.Entity.Design.dll
     b. Microsoft.VisualStudio.TextTemplating.VSHost.11.0.dll in the GAC.

Erica Mohler
Microsoft Program Manager
Posted by Rowan Miller on 3/22/2013 at 10:24 AM
You can find more information on this issue (including workarounds) here - http://romiller.com/2013/03/21/processor-named-t4vshost-could-not-be-found-for-the-directive-named-cleanupbehavior/
Posted by Microsoft on 3/5/2013 at 10:39 AM
Hello, thank you for reporting that you are still seeing this issue in the final release of Update 1. We are re-activating the issue and will investigate. ~EF Team
Posted by TimTx1 on 2/27/2013 at 9:17 AM
Just added the final version of Update 1. EF Code-First was working before, now it is not. So, despite what Microsoft has said here, it is NOT fixed in the final version of Update 1. The workaround however works around the Microsoft bug. Perhaps Microsoft should actually fix this bug, rather than just saying it is fixed.
Posted by tofutim on 2/12/2013 at 11:03 AM
I have this issue in 11.0.51106.01 Update 1
Posted by BentleyD on 1/3/2013 at 7:35 AM
I just downloaded the vs2012 Update 1 (not the CTP) as i was prompted to by the system this morning. I never had the update CTP on my machine. I am having the same issue so it looks like it was not fixed in the final version. Is this bug still opened or do I need to report another one on the final version?
Posted by Microsoft on 12/3/2012 at 4:33 PM
Thank you for reporting this issue, it was fixed in the final version of Update 1.
~EF Team
Posted by DrZaius2 on 12/3/2012 at 9:01 AM
same problem and workaround worked.
Posted by Brian Swiger on 11/29/2012 at 2:06 PM
Saved me! Thanks a bunch.
Posted by ojorma on 11/29/2012 at 3:37 AM
Same thing here. But the workaround worked. Thanks. You're a project saver
Posted by Microsoft on 11/6/2012 at 11:21 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been reproduced and has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 11/2/2012 at 3:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)