Use of Config Files

2 posts, 0 answers
  1. Michael Kellogg
    Michael Kellogg avatar
    8 posts
    Member since:
    Oct 2009

    Posted 09 Nov 2009 Link to this post

    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?
  2. Damyan Bogoev
    Damyan Bogoev avatar
    581 posts

    Posted 10 Nov 2009 Link to this post

    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.

    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.
  3. DevCraft banner
Back to Top