This project has moved and is read-only. For the latest updates, please go here.

Getting Argument 'xmlReader' is not valid. A minimum of one .ssdl artifact must be supplied error

Mar 9, 2015 at 11:46 AM
If my unit test project has two classes that use effort then i get the following error:

Argument 'xmlReader' is not valid. A minimum of one .ssdl artifact must be supplied.

Works fine if there is one class.

Code the test is running:
IDataLoader loader = new Effort.DataLoaders.CsvDataLoader(Path.Combine(TestContext.DeploymentDirectory, "csvFiles"));
        using (EntityConnection connection = Effort.EntityConnectionFactory.CreateTransient("name=Entities", loader))
            BussinnesLayer.Customer[] customers = Customer.GetCustomers(connection);
            Assert.IsTrue(customers.Length > 0, "Customer list length = 0");
App.Config contains the following for the entity connection string: (removed sensitive data)
<add name="Entities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=servername;initial catalog=database;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

Any help would be appreciated.
Apr 13, 2015 at 12:57 PM
If my unit test project has two classes that use effort
I am quite confused what is this supposed to mean. Could you elaborate?
Apr 13, 2015 at 1:05 PM
Think an example is required:

-> contains ClassA
-> contains ClassB

Both of the classes use Effort.

Anyway thank you for your reply. I posted the question on Stackoverflow and somebody on there managed to answer it. Guess i forgot to put a reply on here to say it is answered.
The problem isn't with Effort but with Entity Framework. I had to modify the connection string to include the assembly that contains the EF model.
Connection string looks like this:
add name="Entities" connectionString="metadata=res://DataLayer/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=JRAW2-PC\RADANSQLSERVER;initial catalog=e2i_2015;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" 
Apr 13, 2015 at 1:21 PM
Yeah, entity connection strings can be a little bit messy. Glad you managed to solve this issue.