473,511 Members | 15,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to modify library-specific settings in referencing applications

I understand that settings stored in the app.exe.config file and
accessed via Properties.Settings.Default are only available within an
app domain, but I'm confused about the best way to handle merging
settings that were defined for referenced libraries.

For example, we have a connection string which is stored as a setting
in a library project referenced by several application projects. The
setting was created automatically when we created a dataset within the
library project. We would like to be able to modify the connection
string in a single location so that we can easily switch the data
source. We have developers in multiple locations, using different
databases (including local copies). It would be ideal if they could
make a small modification to a single file after updating from source
control, without recompiling the library. Right now they have to open
the library project, change the connection string and recompile, even
though they're only consumers of the library.

I suspected that the solution would involve a merging of the
library.dll.config file with the corresponding app.exe.config file,
but I haven't found a simple way to achieve this. Perhaps there's a
completely different approach that will work.

Any ideas?

- Dan

Oct 18 '07 #1
1 2051
Dan,

Well, if you have a "library.dll.config" file, then I don't see how you
are using the config classes that are in the framework, as that only works
on the config file for the hosting executable.

You should be able to create a custom configuration section, as
described here:

http://msdn2.microsoft.com/en-us/library/2tw134k3.aspx
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<dh*****@gmail.comwrote in message
news:11**********************@q5g2000prf.googlegro ups.com...
>I understand that settings stored in the app.exe.config file and
accessed via Properties.Settings.Default are only available within an
app domain, but I'm confused about the best way to handle merging
settings that were defined for referenced libraries.

For example, we have a connection string which is stored as a setting
in a library project referenced by several application projects. The
setting was created automatically when we created a dataset within the
library project. We would like to be able to modify the connection
string in a single location so that we can easily switch the data
source. We have developers in multiple locations, using different
databases (including local copies). It would be ideal if they could
make a small modification to a single file after updating from source
control, without recompiling the library. Right now they have to open
the library project, change the connection string and recompile, even
though they're only consumers of the library.

I suspected that the solution would involve a merging of the
library.dll.config file with the corresponding app.exe.config file,
but I haven't found a simple way to achieve this. Perhaps there's a
completely different approach that will work.

Any ideas?

- Dan

Oct 18 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1572
by: Fuzzyman | last post by:
I am trying to parse an HTML page an only modify URLs within tags - e.g. inside IMG, A, SCRIPT, FRAME tags etc... I have built one that works fine using the HTMLParser.HTMLParser and it works...
2
2194
by: Rob | last post by:
Hi, In the server explorer in Visual Studio.Net I'm able to design tables, create stored procedures, etc for the SQL 2000 database running locally on my computer. If I add a connection to a remove...
2
1546
by: tc | last post by:
I would like to create an application that can modify the content and style(e.g. font size, font, style) in a MS Word document. Can anyone give me some idea/reference? thanks
1
1448
by: harry | last post by:
Hi all I am using VS.NET 2003 installer to deploy my ASP.NET application. I want to allow ASPNET write access to some files in subfolders of the inetpub/wwwroot/myApp/mySubfolder using VS.NET...
2
2159
by: Vols | last post by:
I have a class that many libraries depend on. If I modify the class with 'adding an argument with default value to an existing member function', is it necessary to recompile all library? How about...
1
1643
by: zhongling | last post by:
I want to modify STL to suite my requirement, So I download sgi STL , Now I am reading one file of them "concept_checks.h", I don't how it can check the concept and report error when compile, such...
2
2272
by: brenda24 | last post by:
Hi, I have programmed in other languages too much, so i might be missing out something simple in C++. I'm using a library function that takes a (char*) parameter as its input. The problem is that...
1
1266
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current page in a browser?...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.