Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3663118
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:29:37+00:00 2026-05-19T01:29:37+00:00

I would like to have the EntityFramework4 model (.edmx and .context.tt) in a Class

  • 0

I would like to have the EntityFramework4 model (.edmx and .context.tt) in a Class Library called ModelLibrary and the code generated entities incl. the partial classes (.tt) inside a separate Silverlight Class Library called EntitiesLibrary.

This way I was hoping to share the EntitiesLibrary with my silverlight application for self-tracking. In order to consume this project within the silverlight application the class library has to be a Silverlight class library and I think this is where the problem starts.

In the next step I have added a Siverlight Application project and let it to be hosted in a new ASP Web project. In the ASP Web Project I have added a WCF Service and a reference to both ModelLibrary and EntitiesLibrary and created some CRUD operations in there.

Now within the Silverlight Application I add a Service Reference to the Wcf Service, while it can discover the service, when clicking ok; I get an error message:

Could not load file or assembly ‘System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’ or one of its dependencies. The system cannot find the file specified.

On the Service.svc.cs – while having no compiling issues – Resharper is showing me some errors on the entities used in the operations:

Module ‘System, Version=2.0.5.0, Culture….’ should be referenced.

??? Now I am completely stuck. Also unusual is that under references of ModelLibrary and under ASP Web host pointing to EntitiesLibrary I see a yellow marking. This happens only because the latter is of type Silverlight Class library. It doesn’t happen if I had a normal class library.

Would be great if somebody had an advice for me,
Many Thanks
Kave

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:29:38+00:00Added an answer on May 19, 2026 at 1:29 am

    I have followed the Jenny Lerman’s “Entity Framework” book, where she creates a link to the auto generated entities within a seperate Class Library.

    As I had suspected it, if I would use a Console Application instead of Silverlight and have a plain Class Library for my Entities, it would work just fine. The Added Webservice reference can work with the Entities to create a proxy. Just like in the book.

    However if the class library is of type Silverlight Class library – due restriction in Silverlight assemblies – the WCF service reference pointing to a CLR 4.0 webservice can’t be somehow created due mismatching libraries.

    I stopped digging further into this matter and have been since trying to get RIA Services working, which seems far more promosing than Self Tracking POCOs.

    Yet the problems with a proper n-Tier infrastructure still remains to be discovered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.