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)

1

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.