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
======================================================
VS2013: Cannot regenerate entities in EF6
Re: VS2013: Cannot regenerate entities in EF6
1. You are using ADO.NET Entity Data Model item (*.edmx), aren't you?abitofhelp wrote: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 an entity in EF's designer and saved the change. When EF tried to regenerate the entity file, I received the following exception.
Cannot find file "C:\PROJECTS\XXXXXServiceMySql\XXXXXServiceMySql\Models\Customer.cs".
2. Which option ("EF Designer from database", "Code First from database", etc) did you choose in the wizard?
3. Please send us a small test project and specify the exact steps we should follow to reproduce the issue in our environment.
JIC: We recommend using Entity Developer (Devart Entity Model, *.edml) instead of EDM Designer (ADO.NET Entity Data Model, *.edmx) because it is adjusted for working with MySQL and has an advanced functionality: http://www.devart.com/entitydeveloper/ed-vs-edm.html. Additionally, Entity Developer adds registration of EF6-provider in app.config automatically.