Page 1 of 1

App.Config Generation

Posted: Sat 26 Jan 2013 09:55
by smlemmon
Hi,

I have just started using Entity Developer 5 and have noticed a small problem.

I have a solution with multiple projects in it, all of which are projects that have their own EDML File.

It seems that whenever I add a new EDML file to a new project, the app.config file is not added to the new project.

What appears to happen is that the ConnectionString is added to the app.config file of the first project I added to the solution.

Perhaps I am just missing something.

Cheers

Simon

Re: App.Config Generation

Posted: Mon 28 Jan 2013 16:43
by Shalex
smlemmon wrote:What appears to happen is that the ConnectionString is added to the app.config file of the first project I added to the solution.
This is a designed behaviour: the connection string entry is added to the *.config file of the project which is set as a startup project of the solution. The reason is that it is only startup project's *.config which will be available in the runtime when you run your solution.

Re: App.Config Generation

Posted: Tue 29 Jan 2013 07:53
by smlemmon
Hi,

Yes, fair point - I can see the benefit in this.

However, in my situation, I have a solution which is responsible for a set of shared Data Access assemblies.

I have a separate config file in each one, and then tend to copy the connection string from that config file to whichever application is using it at build time.

It isn't a massive problem, just a extra bit of manual work to copy them through manually when creating each of my projects that use Entity Developer.

Thanks for the reply anyway.

Simon

Re: App.Config Generation

Posted: Tue 29 Jan 2013 17:02
by Shalex
You should copy the connection string manually.