Link to home
Start Free TrialLog in
Avatar of mhas01
mhas01Flag for Costa Rica

asked on

Visual Basic Solution-wide data connection

Good morning. I have an App.config file in one of the projects in my solutions. What I'd like is that from another project created within the same solution I am able to reuse this App.config file in this project, so that I don't have to manage two (or more) data-connection configurations.

Thanks in advance for your urgent help.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mhas01

ASKER

I'd refuse to do that ... I'd do it only if it was not possible from the built-in functions, (I mean, it would be like re-writing the whole visual basic approach) best-practices, some already existing methodology within visual studio 2012, visual basic, that I could in my solution add new projects and have these projects inherit the datasets already existing in the main project of the solution.

 I was thinking maybe the app.config file, but how? Thanks again!
>and have these projects inherit the datasets already existing in the main project of the solution

A solution can have a startup project, a project which is started when you run the solution itself instead of an individual project, but I am not aware of any way of having a main project which other projects can link to without having a reference to the project.
Avatar of mhas01

ASKER

Ain't it possible, somehow, to utilize one project's App.config file from another project as its own? Like an include?
You can use ConfigurationManager class to open a config file but this requires path information

http://msdn.microsoft.com/en-us/library/ms224437(v=vs.110).aspx