EF 正在运行转换: System.Reflection.TargetInvocationException: 调用的目标发生了异常。

来源:互联网 发布:choice数据 价格 编辑:程序博客网 时间:2024/05/21 08:01

错误1正在运行转换: System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.IO.FileNotFoundException: 无法定位文件
   在 Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
   在 Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   在 Microsoft.VisualStudio.TextTemplating5ED689C2990069EA428DCCB81FD047FF.GeneratedTextTransformation.DynamicHost.ResolvePath(String path)
   在 Microsoft.VisualStudio.TextTemplating5ED689C2990069EA428DCCB81FD047FF.GeneratedTextTransformation.MetadataLoader.TryCreateEdmItemCollection(String sourcePath, String[] referenceSchemas, EdmItemCollection& edmItemCollection)
   在 Microsoft.VisualStudio.TextTemplating5ED689C2990069EA428DCCB81FD047FF.GeneratedTextTransformation.MetadataLoader.CreateEdmItemCollection(String sourcePath, String[] referenceSchemas)
   在 Microsoft.VisualStudio.TextTemplating5ED689C2990069EA428DCCB81FD047FF.GeneratedTextTransformation.TransformText()
   在 Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)1 1


在asp.net 自跟踪模板生成器中需要指定你的edml的路径,

在EMDX界面中空白处点右键,在右键菜单中选择“添加代码生成项”。