New Posts New Posts RSS Feed: Code first generation in 6.1.7 with VS11 Beta
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Code first generation in 6.1.7 with VS11 Beta

 Post Reply Post Reply
Author
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Topic: Code first generation in 6.1.7 with VS11 Beta
    Posted: 14-Jun-2012 at 4:27pm
Hi Walid,
 
After adding one additional model to the solution, I was able to repro the issue.
I'm filing a bug in this regard and will keep you updated on our progress.
 
Regards,
   Silvio.
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Posted: 13-Jun-2012 at 5:00pm
Hi Silvio,
 
I tested your application and without changing anything I have the issue. I did rebuild the solution 20 times and got 6 times the error. Each time the error was on the Model2, below the stack trace if it can help.
 
Could it be an installation problem since I have both 2010 and 2012RC on my computer ?
Let me know if you want I check something on my system.
 
 
 
Erreur 1 Échec inattendu de la tâche "EntityModelMetadataDeploy".
System.Runtime.InteropServices.COMException (0x8001010A): Le filtre de messages indiquait que l’application était occupée. (Exception de HRESULT : 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))
Server stack trace:
   à EnvDTE.ProjectItem.get_ProjectItems()
   à IdeaBlade.VisualStudio.DTE.DTEHelper.<GetProjectItems>d__28.MoveNext()
   à IdeaBlade.VisualStudio.DTE.DTEHelper.<GetProjectItems>d__22.MoveNext()
   à System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   à IdeaBlade.VisualStudio.DTE.DTEHelper.GetProjectItemByName(Project project, String name)
   à IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.WriteResourceFiles(IList`1 modelList)
   à IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.Execute()
   à System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   à System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
   à System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   à System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   à Microsoft.Build.Framework.ITask.Execute()
   à Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   à Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() CodeFirstWalk.Model2
 
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 13-Jun-2012 at 4:45pm
Hi Walid,
 
We tried to reproduce your issue, but were not able to.
 
I've attached a simple CF sample with 2 models where I was able to compile/run without issues.
 
Please modify it to repro the issue or provide a sample that demonstrates the problem.
 
Regards,
   Silvio.
 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 06-Jun-2012 at 9:36am
Thanks for the update.
 
We didn't make any Code First or VS 2012 related changes for the 6.1.7.1 patch release.  The only change from 6.1.7.0 was a fix for a performance problem, so you will still see the VS11 /  VS2012 issues you saw previously.   We should have some additional VS2012 fixes in the 6.1.8 release.
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Posted: 06-Jun-2012 at 8:53am
For information, the "EntityModelMetadataDeploy" issue still exist on 6.1.7.1 with the VS2012RC.

A project having just one model can sometimes build after 1 or 2 retry but when you have a solution with multiple models (my case), there is always some models which doesn't compile. you can try to compile them one by one, it always fail when you hit F5.

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 04-May-2012 at 10:44am
There actually shouldn't have been a need to reinstall, unless you wanted to go back to DF 6.1.6. 
 
For DevForce to recognize the ibmmx it has to be set as an Embedded Resource in the project, so that's one thing to check. 
 
The Code First compile problem(s) will occur only in VS11.  You should be able to use CF in VS2010 without problems (or any additional problems than you might have had in prior DevForce releases).
 
When DevForce doesn't (re)generate the ibmmx there can be several reasons -
1) the EntityModelMetadataDeploy task was not run because there's no .cf file, the SkipDevForce build property flag is on, or the task is not installed, or
2) the task runs correctly but thinks the ibmmx file is up-to-date.
 
 
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Posted: 04-May-2012 at 8:09am
Another thing happening since the uninstall/install
 
I did compile the solution with VS10, it generated the ibmmx file and the application run perfectly.
now it I run the same solution within VS11, it generate an exception during the EntityManager creation.
 
Unable to initialize EntityManager
Unable to get metadata for MyApp.Security.Entities.Groupe. Make sure it is a valid entity type or POCO type with a KeyAttribute
 
It's like it ignored the ibmmx file ...
 
 
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Posted: 04-May-2012 at 7:59am
I had many msbuild.exe instance, I killed them all. then I wanted to try but I broke everything.
 
Just before, I did an uninstall of the 6.1.7 and then reinstalled it. Now, if I delete the .ibmmx file, it never generates it and says all is done.
The uninstall broke something which a repair or a new install didn't fix (I tried both).
Any idea where I should look ?
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 04-May-2012 at 7:45am
Scratch my question on the build server - the EntityModelMetadataDeploy task does not normally run on the build server.
 
We haven't seen this particular error before, but have seen a few other problems with builds in VS11 (see http://drc.ideablade.com/xwiki/bin/view/Documentation/code-first-troubleshooting#HBuilderrorsinVisualStudio11Beta).  I'm guessing that you can still run your application because the prior ibmmx file is still present and unchanged.  If you were to delete the ibmmx and try a build, you'd probably see that the ibmmx is not regenerated.
 
When you close your solution, also check the Windows Task Manager to see that there are no devenv.exe or msbuild.exe instances still running, and close them if so.  Then try the build again.
 
Builds in VS11 are shelled to MsBuild.exe instances, which does cause problems with our Code First build-time support.  We have a command line tool which can also be used to regen an ibmmx, which we may need to ship until we get the CF problems in VS11 worked out.
 
 
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Posted: 04-May-2012 at 7:23am
I didn't try to update the build server yet.
 
 
Actually I have this error within Visual Studio every time I try to compile. I closed many time my VS instance, it didn't work a single time.
However, it seems this error doesn't always block the execution of the application.
Exemple :
1. I do a full generate on my solution
  => I am getting this error on every model
2. then I hit F5 and the application start dispite the error
  => note that the errors are still displayed in the error log window
 
Or
 
1. I build the solution
  => I have the errors
2. I build every model one by one to
3. I can start the application
 
 
One annoying things (but probably a VS11 bug) is that if I have some errors in my code, I see those errors in the Error window during the compilation time but when the compilation end they all disapears and only the EntityModelMetadataDeploy's error are left.
This make it very hard to fix the error in the code ....


Edited by Walid - 04-May-2012 at 7:31am
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 04-May-2012 at 7:07am
There are some issues with the CF build time support in VS11 Beta.  Try closing all instances of Visual Studio, then open the solution and try building the project again.  Let us know if it still isn't working, or if you're getting this error on your build server.
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Posted: 04-May-2012 at 2:17am
Hi,

I am getting this error during the compilation of my CF models in VS11 beta with the last version 6.1.7 of Devforce.


Note :  the message "Le filtre de messages indiquait que l’application était occupée" could be translated to something like  "The message's filter indicated the application was busy"

Erreur 4 Échec inattendu de la tâche "EntityModelMetadataDeploy".
System.Runtime.InteropServices.COMException (0x8001010A): Le filtre de messages indiquait que l’application était occupée. (Exception de HRESULT : 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

Server stack trace: 
   à EnvDTE.ProjectItem.get_Name()
   à IdeaBlade.VisualStudio.DTE.DTEHelper.<>c__DisplayClass39.<GetProjectItemByName>b__38(ProjectItem pi)
   à IdeaBlade.VisualStudio.DTE.DTEHelper.<GetProjectItems>d__28.MoveNext()
   à IdeaBlade.VisualStudio.DTE.DTEHelper.<GetProjectItems>d__22.MoveNext()
   à System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   à IdeaBlade.VisualStudio.DTE.DTEHelper.GetProjectItemByName(Project project, String name)
   à IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.WriteResourceFiles(IList`1 modelList)
   à IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.Execute()
   à System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   à System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   à System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   à System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   à Microsoft.Build.Framework.ITask.Execute()
   à Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   à Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__1c.MoveNext() WSoft.Security



Edited by Walid - 04-May-2012 at 4:04am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down