VS2013: Cannot regenerate entities in EF6
Posted: Wed 06 Aug 2014 23:40
Hello,
I am using VS2013, fully updated, and am evaluating dotConnect for MySQL for a product that we are creating. The application is a WebApi 2.2 restful service using odata 4 and entity framework 6. Creating the EF model from a MySQL database works great! However, the name of the entities in EF are all lowercase. We need to have the first letter uppercase (i.e. customer becomes Customer). So, I changed the name of the entity in EF and saved the change. When EF tried to regenerate the entity file, I received the following exception. When I did the installation of dotConnect, it mentioned something about "Registration of Entity Framework Code-First Migrations". Could this be the issue? If so, could you please tell me how to do this registration... The instructions were not very clear.
Thank you for your help and time,
Mike
================================
Error 1 Running transformation: System.Runtime.InteropServices.COMException (0x80004005): Cannot find file "C:\PROJECTS\XXXXXServiceMySql\XXXXXServiceMySql\Models\Customer.cs".
Server stack trace:
at EnvDTE.ProjectItems.AddFromFile(String FileName)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.ProjectSync(ProjectItem templateProjectItem, IEnumerable`1 keepFileNames)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.<.ctor>b__66(IEnumerable`1 keepFileNames)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Action`1.EndInvoke(IAsyncResult result)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.Process(Boolean split)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.TransformText() C:\PROJECTS\XXXXXServiceMySql\XXXXXServiceMySql\Models\Model.tt 1 1 XXXXXServiceMySql
======================================================
I am using VS2013, fully updated, and am evaluating dotConnect for MySQL for a product that we are creating. The application is a WebApi 2.2 restful service using odata 4 and entity framework 6. Creating the EF model from a MySQL database works great! However, the name of the entities in EF are all lowercase. We need to have the first letter uppercase (i.e. customer becomes Customer). So, I changed the name of the entity in EF and saved the change. When EF tried to regenerate the entity file, I received the following exception. When I did the installation of dotConnect, it mentioned something about "Registration of Entity Framework Code-First Migrations". Could this be the issue? If so, could you please tell me how to do this registration... The instructions were not very clear.
Thank you for your help and time,
Mike
================================
Error 1 Running transformation: System.Runtime.InteropServices.COMException (0x80004005): Cannot find file "C:\PROJECTS\XXXXXServiceMySql\XXXXXServiceMySql\Models\Customer.cs".
Server stack trace:
at EnvDTE.ProjectItems.AddFromFile(String FileName)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.ProjectSync(ProjectItem templateProjectItem, IEnumerable`1 keepFileNames)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.<.ctor>b__66(IEnumerable`1 keepFileNames)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Action`1.EndInvoke(IAsyncResult result)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.EntityFrameworkTemplateFileManager.VsEntityFrameworkTemplateFileManager.Process(Boolean split)
at Microsoft.VisualStudio.TextTemplatingA5B9DB760675181A2EC13B07FF753E49EA42DE24CB6D85E82367A0519E3FDB9CF7B431158656BA24E7200C04B466699F0BC93B995B23396D4A9FE0DFA70FA659.GeneratedTextTransformation.TransformText() C:\PROJECTS\XXXXXServiceMySql\XXXXXServiceMySql\Models\Model.tt 1 1 XXXXXServiceMySql
======================================================