views:

53

answers:

1

I'm using VS2010, and I've download the C# POCO Entity Generator installed it, now I want to use it.

I can't read the toturial and I can't find any other good toturials, so I've had a go myself - I have created a model and then I'm creating new POCO Entity, but I got the bellow error:

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)

What is the problem? I think it can't find the model mapping, if this is the case, how do I resolve this?

+2  A: 

Check this article for error description and how to deal with it. It is problem of path substitution when creating POCO template from Add item in Visual Studio.

Ladislav Mrnka