简体   繁体   中英

How to create a configuration file (json) for the entire solution in visual studio?

I have a solution with many projects; I would like to have a shared configuration (for example all have the same connection string). During deployment I don't want to make the same modifications in 10 places.

To make matters worse the development folders (bin\Debug\netcoreapp3.1) differs from deployment so that I cannot create a file in a relative path.

Edit: Of course I could just create a config file on a fixed path (ex /etc/MyApp/config.json (linux) or c:%appdata%\MyApp\config.json (win) (or a registry entry)

Since I can't post a comment I'm posting an answer. So, this post might be useful https://stackoverflow.com/a/15496476/11383436

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM