I tried to add some entities from my db to my Model.tt and I couldn't do it. the project doesn't recognize the entities and there aren't appear inside of my Model.tt, but the are in the folder of my project.
When I try to add the new tables/entities I got this error:
Ejecutando transformación: System.InvalidCastException: No se puede convertir el objeto COM del tipo 'System.__ComObject' al tipo de interfaz 'EnvDTE.ProjectItem'. Ocurrió un error de operación debido a que la llamada QueryInterface en el componente COM para la interfaz con IID '{0B48100A-473E-433C-AB8F-66B9739AB620}' generó el siguiente error: Error al cargar la biblioteca de tipo/DLL. (Excepción de HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
Server stack trace:
en System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, Boolean& pfNeedsRelease)
en EnvDTE.ProjectItem.get_FileNames(Int16 index)
en Microsoft.VisualStudio.TextTemplatingEC2717411E6FD5E7E265CE923A7190B6.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.ProjectSync(ProjectItem templateProjectItem, IEnumerable`1 keepFileNames)
en Microsoft.VisualStudio.TextTemplatingEC2717411E6FD5E7E265CE923A7190B6.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.<.ctor>b__3c(IEnumerable`1 keepFileNames)
en System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
en System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
en System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
en System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
en System.Action`1.EndInvoke(IAsyncResult result)
en Microsoft.VisualStudio.TextTemplatingEC2717411E6FD5E7E265CE923A7190B6.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.Process(Boolean split)
en Microsoft.VisualStudio.TextTemplatingEC2717411E6FD5E7E265CE923A7190B6.GeneratedTextTransformation.TransformText()
en Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)
Any clue will be of great help!! Thanks.
User contributions licensed under CC BY-SA 3.0