New Posts New Posts RSS Feed: Save File Error when saving a new model
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Save File Error when saving a new model

 Post Reply Post Reply
Author
zinovate View Drop Down
Newbie
Newbie
Avatar

Joined: 24-Apr-2009
Posts: 9
Post Options Post Options   Quote zinovate Quote  Post ReplyReply Direct Link To This Post Topic: Save File Error when saving a new model
    Posted: 12-Nov-2009 at 2:17pm

I am currently running Devforce 5.2.3.1

When I create a new Silverlight Devforce application I receive the following error when attempting to save the model for the first time.

---------------------------

Save File Error

---------------------------

Failed to save model file: 'C:\Users\Ben\Documents\Visual Studio 2008\Projects\SilverlightApplication3\SilverlightApplication3Web\SilverlightApplication3Web.ibedmx'.

Code generation compiler error: Running transformation: System.InvalidOperationException: Sequence contains no elements

at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)

at IdeaBlade.VisualStudio.OM.DomainModelTemplateBase.Generate()

at Microsoft.VisualStudio.TextTemplating32D922B347BF7ED4B134DB672D544EB5.GeneratedTextTransformation.TransformText() in c:\Users\Ben\AppData\Local\Temp\o9f5ze5f.0.cs:line 24

---------------------------

OK

---------------------------

Back to Top
zinovate View Drop Down
Newbie
Newbie
Avatar

Joined: 24-Apr-2009
Posts: 9
Post Options Post Options   Quote zinovate Quote  Post ReplyReply Direct Link To This Post Posted: 12-Nov-2009 at 2:21pm
I opened one of the samples "\100SLV_SimpleSilverlightApp\CodeCS" and I am able to save that model without issue. I have tried creating solutions in several locations with no luck..
Ben
Back to Top
zinovate View Drop Down
Newbie
Newbie
Avatar

Joined: 24-Apr-2009
Posts: 9
Post Options Post Options   Quote zinovate Quote  Post ReplyReply Direct Link To This Post Posted: 12-Nov-2009 at 6:00pm
Issue resolved,
head slapper..
 
If you open the DevForce tool in VS and try to save without assigning an entity model or web service, you will get the error posted above.
Makes total sence:
 
From the error:
Code generation compiler error: Running transformation: System.InvalidOperationException: Sequence contains no elements.
 
The generator looks like it fires the t4 template with an empty set of elements.
I'd like to see a friendlier warning, maybe catching that the "model" file had no EM or webservice and don't attempt to code gen.
 
Thanks.
Ben
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: 13-Nov-2009 at 4:00pm
This is actually a bug, since an InvalidOperationException like that shouldn't be bubbling up to the user.   We have this fixed in current bits, and thanks for letting us know about it.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down