This is a migrated thread and some comments may be shown as answers.

Use of Config Files

1 Answer 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Kellogg
Top achievements
Rank 1
Michael Kellogg asked on 09 Nov 2009, 08:51 PM
I have various projects in my solution that are using OA to get at my datastore, for example my "DAL" project.  Also, my DAL_Tests project.  Now what I want to be able to do is run the data access through a config file so that the user can change a server or password, etc., without me having to come in and recompile.

What's happening is that OA seems to bomb with "The assembly 'DAL' does not have a config file with an openaccess node" if I set the app.config in each of the projects to "None".  I use this setting so that a nice clean XML ".config" file will be generated in the build and placed into the bin directory.  If I change the BuildAction of the App.config files to "EmbeddedResource" then everything runs fine.  But that doesn't work for me, since the server connection settings in that case are embedded inside the DLL's for each project (i.e. they're not changeable by the user).

Does OA have some requirement that the config info be embedded inside the backend DLL's?  How can I configure this so that everything is inside one or more XML config files?

1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 10 Nov 2009, 01:39 PM
Hello Michael Kellogg,

To achieve this goal you should place the configuration files for the Class Library projects in the output  directories of the projects that are referencing them(Windows forms, Console application etc..)

I think that will help you.

Regards,
Damyan Bogoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Michael Kellogg
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or