As part of a project I'm working on we have a requirement to support Sql Server and Sql Server Compact. Now as it's only the two, I don't mind creating a custom ssdl generated via a T4 template from the default Sql Server one, which works fine. However, this does involve passing round the created file and referencing the path to it.
When it comes to deployment I'd like to embed that custom ssdl file into the dll directly, and preferably access it as you would with a standard ssdl, e.g. have res://*/Model.SqlServerCe.ssdl or something similar in a connection string.
I've tried messing around with the VS build actions and had a bit of a google but can't seem to find anything relevant to embedding custom extra metadata files into a single dll. Is this something anyone's come across before or know hows to do?
Thanks in advance.
Turns out I was being a bit silly, setting the ssdl to embed in the build actions, you can then access the embed resource via its fully qualified name, e.g.
res://*/<dll namespace>.Model.SqlServerCe.ssdl
, which I managed to find from doing a call Assembly.GetManifestResourceNames(). Obvious if you think about it, doh.Thanks to Ladislav for making me look a little more closely.