Print Page | Close Window

Error loading metadata

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=875
Printed Date: 06-Sep-2025 at 3:38pm


Topic: Error loading metadata
Posted By: dykmans
Subject: Error loading metadata
Date Posted: 08-Jul-2008 at 12:56am
Hello,
 
I have created a DevForce EF model application, following the procedure stipulated in chapter "Hello DevForce" of the developer manual. The project compiles without errors. However, when i try to run the following code:
 

DomainModel.DomainModelEntityManager ent = new DomainModel.DomainModelEntityManager();

DomainModel.Subject subject = new DomainModel.Subject();

subject.FirstName = "John";

subject.LastName = "Doe";

ent.AddEntity( subject );

ent.SaveChanges();

 
I always get this error:
 
[Script generated HTML removed from this post by Moderator]
 
 Save failed - Error loading metadata: Cannot find corresponding Client CLR Type for 'nBepsModel.IcsProgram' in DomainModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
 
Where IcsProgram is a navigation property of Subject.
 
Any ideas?
 
Thanks,
Philippe



Replies:
Posted By: dykmans
Date Posted: 08-Jul-2008 at 1:04am
Woooow... I don't know where all that junk in my previous post suddenly came from. But i didn't type it, i swear! ;-)
 
Anyway, the mentioned error is at the end of the garbage, in red.
 
Grtz,
Philippe < ="http://shots.snap.com/client/inject.js?site_name=0" =text/>


Posted By: kimj
Date Posted: 08-Jul-2008 at 12:20pm
Can you post (or send to mailto:support@ideablade.com - support@ideablade.com ) your EDMX file, and also a snippet of the app.config in the AppHelper project for the appropriate edmKey element?
 
Thanks.


Posted By: dykmans
Date Posted: 08-Jul-2008 at 12:43pm
Hey,
 
Thanks for your reply. I just posted another message. They must have crossed eachother.
Give me a minute. I send you the requested files.
 
Thanks,
Philippe


Posted By: kimj
Date Posted: 08-Jul-2008 at 1:52pm
Philippe,
 
From the solution you sent, it looks like you are not using the version of the Entity Framework supported by DEF RC1.  DevForce EF RC1 (v 4.1.2.0) works only with .NET 3.5 SP1 Beta.  Check out the DEF Release Notes, specifically page 4 on breaking changes, for more information.


Posted By: dykmans
Date Posted: 10-Jul-2008 at 1:52am
You are absolutely right! Silly me... For some unrelated reason i had restored my system to a point before the 3.5 SP1 upgrade. All the while thinking i was working with SP1. Sorry about that, and thanks for helping out.
 
[Script generated HTML removed from this post by Moderator
 
Regards,
Philippe < ="http://shots.snap.com/client/inject.js?site_name=0" =text/>



Print Page | Close Window