If we can have several .config files, we can share one configuration file with other projects and put the private configuration in another. Will Visual Studio 2008 get confused?
Visual Studio 2010 supports multiple .config files. This is one of the features of the new web application packaging and deployment system. We can create separate web.config files for each configuration that we have for the application. But in 2008, support for multiple configuration files is not supported, you can get around this by adding two configuration files and renaming them during build
Example:
private.config public.config
pre-msbuild
, web.config app.config
, ...
s
, <appSettings> node, file=, "" , - , - .
<appSettings>
file=
<appSettings file="common.appsettings.config"> <add key="private1" value="value1" /> </appSettings>
common.appsettings.config, , , .
common.appsettings.config
"private" , .
- , .
. . , , web.config, web.config . , web.config , , . , , , .
.config, .
.config
- , XML, . - , . .config .config .
- Visual Studio, .
Each configuration section can be placed in an external file and referenced to the main app.config / web.config file through the configSource attribute. However, you will have to write custom section handlers for each custom section / external configuration file that you want to write, which can be a bit tedious. In addition, the appSettings section can be displayed and specified through the same mechanism.
Source: https://habr.com/ru/post/1743572/More articles:How to remove all objects for a given object from ManagedObjectContext - iphoneС# ASP.NET Binding Controls через общий метод - genericsLooking for a way to highlight specific words in text areas? - javaSetting up a project to create third-party libraries for Android - javaTrying to get a WCF client to work with the wess 1.0 username token - wcfIs it possible to have transparent rendering of images in Photoshop? - cssDatabase solutions for 200 million letters / day, monthly summarization requests - databaseHow to combine similar method calls into a delegate template? - c #If py2exe includes my data files (for example, include_package_data) - pythonProblem with null evaluation in IIF statement (Access) - nullAll Articles