c# - How do I change the default application config/setting in different deployments? -
I have an AC # class library that is built in DLL.
I have some setting values, like paths to directories, which I use inside the class library.
I would like to do this, so that any reference DLL has the chance to edit the default value of the settings (usually through a file). [In the class library] the default value will be FooDir = "C: / Program Files /"
[Project X references the library] We want to change the transformation of the Foodir value "C: / Program Files ( X86) / ".
It would be clear if the Visual Studio will generate the XML file with the configuration / configuration of the config / and then copy the output directory of Project X. And then we could change the value of Frieder and this new value of Füdir would be reflected when running Project X.
How can I get it?
Your best bet here is to create a custom configuration section for your app, for everything Set default, if users want to override anything, they can add configuration sections to their app.config or web.config file.
It is very easy, and quick to do. .
It adheres to the standards that are installed with .NET and should be very familiar to any user.
Comments
Post a Comment