gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 17:34:37 24 4
gpt4 key购买 nike

我使用的是 VS2010,我已经下载了 C# POCO Entity Generator并安装了它,现在我想使用它。

我看不懂 toturial 1 我找不到任何其他好的教程,所以我自己试了一下 - 我创建了一个模型,然后创建了新的 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, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, 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, BindingFlags invokeAttr, Binder binder, Object[] parameters, 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中Add item创建POCO模板时的路径替换问题。

关于c# - 如何使用poco实体生成器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3906701/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com