I’ve moved my Entity Framework 4 model to a class library. The meta files are built to \bin\Debug
What is the connection string I use to locate the meta files in the class library? I have tried:
<add name="Models.DataModelConnectionString"
connectionString="metadata=res://MyClassLibrary, 1.0.0.0, neutral,
null/bin/Debug/Models.DataModel.csdl|res://MyClassLibrary, 1.0.0.0, neutral,
null/bin/Debug/Models.DataModel.ssdl|res://MyClassLibrary, 1.0.0.0, neutral,
null/bin/Debug/Models.DataModel.msl;provider=Devart.Data.Oracle;
....">
I still get the error “The specified metadata path is not valid”.
Do I need to move the meta files to the class library root directory?
Edit
I have tried using res://*/Models.DataModel.csdl etc. but got the error “Unable to load the specified metadata resource.” instead
The solution is to embed the metadata files in the assembly by changing the output from CopyToOutputDirectory to EmbedInOutputAssembly
This would allow
res://*/Model.ssdletc. to work