New Posts New Posts RSS Feed: Error building Code-First model
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error building Code-First model

 Post Reply Post Reply
Author
jbiddle61 View Drop Down
Newbie
Newbie


Joined: 18-Dec-2012
Location: Arizona
Posts: 24
Post Options Post Options   Quote jbiddle61 Quote  Post ReplyReply Direct Link To This Post Topic: Error building Code-First model
    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.

Back to Top
jbiddle61 View Drop Down
Newbie
Newbie


Joined: 18-Dec-2012
Location: Arizona
Posts: 24
Post Options Post Options   Quote jbiddle61 Quote  Post ReplyReply Direct Link To This Post 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.
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: 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down