1

We have a library we provide to customers in a variety of uses on a variety of platforms. We are porting it to .NET Core 3.

One of our methods allows them to pass in the name of a ConnectionString in the app.config or web.config file. I need to write this code so it runs in .NET Core (so no System.Web classes like WebConfigurationManager) and will read from the JSON config file.

But it also needs to read from web.config or app.config if it is being used on .NET standard. So this answer won't work.

What is the best way to do this?

1
  • Same problem here. Did you find any solution? Commented Apr 15, 2020 at 20:02

0

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.