Print Page | Close Window

Error building Code-First model

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4260
Printed Date: 26-May-2025 at 1:05am


Topic: Error building Code-First model
Posted By: jbiddle61
Subject: Error building Code-First model
Date Posted: 02-Aug-2013 at 1:41pm
This is the same solution that I was getting the error trying to save the .EDMX file.

I've just converted my Model project from Database First to Code-First.
Now I get the following error when I try to build the Model project:

Error    1    The "EntityModelMetadataDeploy" task failed unexpectedly.
System.ArgumentException: InvalidParameter
Parameter name: index

Server stack trace:
   at Microsoft.VisualStudio.Package.Automation.OAProperties.Item(Object index)
   at EnvDTE.Properties.Item(Object index)
   at IdeaBlade.VisualStudio.DTE.DTEHelper.IsWindowsStoreProject(Project project)
   at IdeaBlade.VisualStudio.DTE.DTEHelper.<get_WindowsStoreProjects>b__44(Project p)
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at IdeaBlade.VisualStudio.DTE.DTEHelper.get_WindowsStoreProjects()
   at IdeaBlade.VisualStudio.DTE.LinkProjectFinder.FindAnyLinkedProject(String linkedFileName, Project serverProject)
   at IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.SetClientProjectLinks(IList`1 modelList)
   at IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.ExecuteCore(IList`1 modelList)
   at IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.<>c__DisplayClass4.<Execute>b__0()
   at IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.ExecuteLocked(String name, Func`1 action)
   at IdeaBlade.VisualStudio.Build.Tasks.EntityModelMetadataDeploy.Execute()
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

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

Any ideas?
In the meantime, I'm going to try re-creating the model project as Code-First from the start.
I'll post back when I have those results.




Replies:
Posted By: jbiddle61
Date Posted: 02-Aug-2013 at 2:18pm
Recreating the model project in the current solution as Code-First from the start did not change anything.
Still get the build error.

I had to create a brand-new solution with only the model project in it.
I can build the model then.

This is going to make life rather difficult for us if we have to put our models into stand-alone solutions.


Posted By: kimj
Date Posted: 02-Aug-2013 at 3:15pm
You should be able to unload the Install Shield project from your solution and then build the model project, without having to resort to an entirely separate solution for the model.
 
We'll have this fixed in the next release, coming within the next few weeks.



Print Page | Close Window