c# – 如何使用poco实体生成器

前端之家收集整理的这篇文章主要介绍了c# – 如何使用poco实体生成器前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用VS2010,我已经下载了 C# POCO Entity Generator并安装了它,现在我想使用它.

我看不到toturial 1,我找不到任何其他好的toturials,所以我已经走了自己 – 我已经创建了一个模型,然后我正在创建新的POCO实体,但我得到了波纹管错误

Error 1 Running transformation: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Unable to locate file
   at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
   at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method,Object target,Object[] arguments,SignatureStruct& sig,MethodAttributes methodAttributes,RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method,Signature sig,RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object[] parameters,CultureInfo culture,Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,CultureInfo culture)
   at Microsoft.VisualStudio.TextTemplatingA9DB2432A51EA8D42A615FBEB2ECB4E5.GeneratedTextTransformation.DynamicHost.ResolvePath(String path)
   at Microsoft.VisualStudio.TextTemplatingA9DB2432A51EA8D42A615FBEB2ECB4E5.GeneratedTextTransformation.MetaDataLoader.TryCreateEdmItemCollection(String sourcePath,String[] referenceSchemas,EdmItemCollection& edmItemCollection)
   at Microsoft.VisualStudio.TextTemplatingA9DB2432A51EA8D42A615FBEB2ECB4E5.GeneratedTextTransformation.MetaDataLoader.CreateEdmItemCollection(String sourcePath,String[] referenceSchemas)
   at Microsoft.VisualStudio.TextTemplatingA9DB2432A51EA8D42A615FBEB2ECB4E5.GeneratedTextTransformation.TransformText()
   at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session,String source,ITextTemplatingEngineHost host,String& result)

问题是什么?我觉得找不到模型映射,如果是这种情况,我该如何解决

1:由于我家乡的互联网限制.

解决方法

检查 this article是否有错误描述以及如何处理.在Visual Studio中从添加项创建POCO模板时,是路径替换的问题.
原文链接:https://www.f2er.com/csharp/95300.html

猜你在找的C#相关文章