【发布时间】:2012-06-29 09:06:43
【问题描述】:
我有 vs2010,从 nuget 安装了 Entity framework 4.3.1,从 microsoft 安装了 EF 4.x DbContext Generator。我创建了一个项目,然后尝试添加一个新的 EF 4.x DbContext Generator 项目,但出现以下错误。有谁知道如何解决这个问题?
错误 1 运行转换: System.Reflection.TargetInvocationException:已引发异常 通过调用的目标。 ---> System.IO.FileNotFoundException: 无法在以下位置找到文件 Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(字符串 路径)在 Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(字符串 路径)---内部异常堆栈跟踪结束---在 System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo 方法、对象目标、Object[] 参数、SignatureStruct& sig、 MethodAttributes methodAttributes, RuntimeType typeOwner) 在 System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo 方法, 对象目标、Object[] 参数、签名 sig、MethodAttributes 方法属性,RuntimeType typeOwner) 在 System.Reflection.RuntimeMethodInfo.Invoke(对象 obj,BindingFlags invokeAttr、Binder binder、Object[] 参数、CultureInfo 文化、 Boolean skipVisibilityChecks)在 System.Reflection.RuntimeMethodInfo.Invoke(对象 obj,BindingFlags invokeAttr、Binder binder、Object[] 参数、CultureInfo 文化)
在 Microsoft.VisualStudio.TextTemplatingE78BCB29E8D7A2F9432A449161229C3F.GeneratedTextTransformation.DynamicHost.ResolvePath(字符串 路径)在 Microsoft.VisualStudio.TextTemplatingE78BCB29E8D7A2F9432A449161229C3F.GeneratedTextTransformation.MetadataLoader.TryCreateEdmItemCollection(字符串 sourcePath, String[] referenceSchemas, EdmItemCollection& edmItemCollection) 在 Microsoft.VisualStudio.TextTemplatingE78BCB29E8D7A2F9432A449161229C3F.GeneratedTextTransformation.MetadataLoader.CreateEdmItemCollection(字符串 源路径,字符串 [] 参考架构)在 Microsoft.VisualStudio.TextTemplatingE78BCB29E8D7A2F9432A449161229C3F.GeneratedTextTransformation.MetadataLoader.TryLoadAllMetadata(字符串 输入文件、元数据工作空间和元数据工作空间)在 Microsoft.VisualStudio.TextTemplatingE78BCB29E8D7A2F9432A449161229C3F.GeneratedTextTransformation.TransformText() 在 Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession 会话,字符串源,ITextTemplatingEngineHost 主机,字符串& 结果)1 1
【问题讨论】:
标签: entity-framework t4