2
我在Win 7 Ultimate SP1和EF Power Tools上使用MS Visual Studio 2012 Update 1。實體框架反向工程代碼首先與MySql一起使用?
我想在MySql數據庫上使用實體框架的反向工程器代碼優先功能。我可以成功連接到數據庫,但是當它試圖完成的代碼生成我得到以下錯誤:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.DbContextPackage.Extensions.ProjectExtensions.InstallPackage(Project project, String packageId)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)
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)
我一直無法找到使用我的谷歌foo的任何信息。
最有可能的,但是這取決於你的安裝包。這是你嗎? http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d name:Justin Skiles – 2012-12-28 03:00:31
是的,那是我正在使用的軟件包。我會用它更新這個問題。 – drneel