0

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)

  • Based on my research, I find that shared project may be useful for you. Please refer to the link[single app.config multi-project c#](https://stackoverflow.com/a/42163362/11507778) – Jack J Jun Mar 03 '21 at 07:40

1 Answers1

0

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

  • I already found that; unfortunately it does not solve my problem; it makes me write one time from Visual Studio and then it copies the file; but the problem is during deployment when the file gets copied in all projects and all must be modified; and if no copy then I cannot find the file – Victor Iorinescu Mar 02 '21 at 13:02