views:

33

answers:

1

I am having some refactor troubles, maybe someone knows why...

In one solution I have a WCF service. In another solution I have a RIA application. Since the SQL database between these two is identical, I wanted to create a separate project, in which to host the edmx file as well as a domain service. If I create the edmx file in the WCF project directly, and do the same on the RIA side, everything works fine.

But when I try to pull this edmx file into a separate project and add references to it I get all kinds of bizarre errors that my entity objects cannot be found. The WCF service itself seems fine, in that it references the edmx project and compiles just fine.

But the WCF client project, that has a service reference to the WCF service pukes on the entity references. Even adding the edmx assembly doesnt really help- some entities are found others are not. Very odd.

Anyone know what Im missing?

A: 

Based on what you've posted so far and taking it that you've ensured that the "edmx" project has a new namespace that is also used by the other projects.

If I'm reading what you've said correctly:

  • your WCF server references the "edmx" project.
  • your WCF client references the WCF server AND the "edmx" project.

It could be something as simple as circular referencing conflicts. Make sure that any "edmx" reference data within both of the other projects aren't public, just in case the client is picking up "edmx" data from the server project.

Also check whether missing items are left at the default accessibility of internal (when not defined).

ChrisBD