Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5054

writing and linking to a common config file

$
0
0

I have a console app project that write some info to a common.app.config file which other project will share. The writing operation is as follows:

var configMap = new ExeConfigurationFileMap{    ExeConfigFilename = @"C:\config\common.app.config"};var config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);config.AppSettings.Settings.Add("FullLogPath",combinedPath);config.Save(ConfigurationSaveMode.Minimal,true);ConfigurationManager.RefreshSection("appSettings");

I have added the common.app.config file from another project as link to avoid copying.

Now the question is how can I open and read this linked config file from the other project's code in runtime.


Viewing all articles
Browse latest Browse all 5054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>