App.Config Generation

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
smlemmon
Posts: 7
Joined: Sat 26 Jan 2013 09:51

App.Config Generation

Post by smlemmon » Sat 26 Jan 2013 09:55

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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: App.Config Generation

Post by Shalex » Mon 28 Jan 2013 16:43

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.

smlemmon
Posts: 7
Joined: Sat 26 Jan 2013 09:51

Re: App.Config Generation

Post by smlemmon » Tue 29 Jan 2013 07:53

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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: App.Config Generation

Post by Shalex » Tue 29 Jan 2013 17:02

You should copy the connection string manually.

Post Reply