473,671 Members | 2,251 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.Sett ings.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.con fig 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 2068
Dan,

Well, if you have a "library.dll.co nfig" 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.co m

<dh*****@gmail. comwrote in message
news:11******** **************@ q5g2000prf.goog legroups.com...
>I understand that settings stored in the app.exe.config file and
accessed via Properties.Sett ings.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.con fig 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
1580
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 fine.... on good HTML. Having done a google it looks like parsing dodgy HTML and having HTMLParser choke is a common theme. I would have difficulties using regular expressions as I want to modify local reference URLS as well as absolute ones.
2
2205
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 server on the network, I'm not able to do the above. Is there something that must be set in order to allow this. Thanks
2
1555
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
1456
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 2003 deploy project. Is there a script or conditions that I have to set in the deployment project's properties? I have tried deploying it but could not find where I would grant ASPNET
2
2169
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 'changing destructor into virtual' to the class? I think we don't need to recompile all library if we only add a constructor to the class or add a data member to the library.
1
1656
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 as follow semantics,I need some anotate. #define __STL_REQUIRES(__type_var, __concept) \ do { \ void (*__x)( __type_var ) = __concept##_concept_specification< __type_var >\ ::__concept##_requirement_violation; __x = __x; } while (0)
2
2281
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 this library function modifies this parameter. Hence I get segmentation fault if I pass it a pointer to something unmodifiable (at least, that's my understanding of the segmentation fault). I wouldn't want to modify the library function, so how could...
1
1273
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current page in a browser? ----------------------------------------------------------------------- Using the DOM the non-standard but widely implemented innerHTML extension, the following would be sufficient to modify the content of any element that can have content: ` <div id="anID">Some Content</div` with script of `...
0
8476
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6229
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4225
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.