Hello,
I originally had multiple assemblies with different edmx files which were mapping to one database.
To keep the EDMX files from becoming too large, I split them into seperate assemblies.
This all worked fine. I had the following in the web config
<connectionStrings>
<add name="SecurityEntities" connectionString="metadata=res://*/SecurityModel.csdl|res://*/SecurityModel.ssdl|res://*/SecurityModel.msl;provider=System.Data.SqlClient;provider connection string="removed"" providerName="System.Data.EntityClient" />
<add name="ProductsEntities" connectionString="metadata=res://*/ProductsModel.csdl|res://*/ProductsModel.ssdl|res://*/ProductsModel.msl;provider=System.Data.SqlClient;provider connection string="removed"" providerName="System.Data.EntityClient" />
<add name="CustomersEntities" connectionString="metadata=res://*/CustomersModel.csdl|res://*/CustomersModel.ssdl|res://*/CustomersModel.msl;provider=System.Data.SqlClient;provider connection string="removed"" providerName="System.Data.EntityClient" />
</connectionStrings>
All the connection strings pointed to the same database, and each domain model had the correct connection string.
Because VS 2010 takes forever to compile when there are a large number of projects, I decided to merge all the EDMX files into their own assembly called DomainModel.
All edmx files were in their own directory and the Namespace was identical as before.
I then modified the connectionstrings in the webconfig to point to the new resource so SecurityModel.csdl became
Security.SecurityModel.csdl, SecurityModel.ssdl became Security.SecurityModel.ssdl etc, to cater for the new metadata artifact resources in the DomainModel.
However, I am now getting the error on the server:
The model's metadata artifact files (csdl, msl, ssdl) are either invalid or could not be found, either as resources in an assembly or loose in the output directory. Perhaps you have multiple assemblies containing the same metadata. Check the connection string for key 'SecurityEntities', which says the artifact filenames are Security.SecurityModel.csdl, Security.SecurityModel.ssdl, and Security.SecurityModel.msl. Do these names match the actual artifact filenames? All three root names (e.g., 'Security.SecurityModel') should be the same and match the edmx filename unless you changed them deliberately.
I have checked the resources using reflector in the DomainModel assembly and metadata artifact files are exactly as specified. I have also made sure there are no old assemblies still lurking around.
Do you have any pointers to try to try and fix this problem?
Thanks
Chris