Im creating a .net standard 2.0 library and I need to read web.config(.net framework) when a .net application is using my library and appsettings.json(.net core 2.1) when a .net core 2.1 application is using my library. Some people suggested to use System.Configuration.ConfigurationManager which can be used universally to read files but a .net core 2.1 application fails to read the config file.
Can anyone help me on this? And also suggest me If Im doing the right way(like reading config from class libraries)