views:

121

answers:

1

I'm doing a very non-standard build of Entity Framework. I've used EdmGen2 to generate edmx off of a db, and split the component csdl, msdl and ssdl files into their own files. The metadata in the connection string to them looks like this:

C:\Downloads\EDM | filename.csdl | filename.msdl | filename.ssdl

I have a unit test that does nothing but try to open the connection, and I get this error (along with a lot of other chaff):

"Each type name in a schema must be unique"

If I go into the csdl manually and add a "1" to the names, it eventually moves onto the msdl file and starts complaining about it. Clearly, somehow the schema is getting double-defined in the open operation...

  1. There is no reference to the edmx in the test or dependent project. In fact, there are no references to any of those, as this is a project for generating all this stuff dynamically at run-time.
  2. I've seen the Julie Lehrman / Don't Be Iffy post, and it doesn't appear to be that problem.

TIA...

A: 

Figured it out...the Metadata workspace is apparently hard coded to look for the three files (which makes sense), and when I removed the directory specification in the metadata tag, it all started working. My metadata attribute now looks like this:

C:\Downloads\filename.csdl | C:\Downloads\filename.msdl | C:\Downloads\filename.ssdl

So I think it's an either / or proposition: either specify the directory where the files are located, or the individual file locations.

Chris B. Behrens