© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
11 replies
Pokey

❔ Check if appsettings.json or appsettings.Development.json

I need to write settings back to my configuration json during the operation of the current application. To achieve this, I open the appsettings.json file and write the newly serialised values. This works perfectly in production, but causes issues in development.

How can I tell which json file the current application is using at the topmost level? I know it is appsettings.Development.json when running in a development context, but I have not found a way to determine this whilst the application is running.

Thanks
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Issues using `.json5` files for `appsettings.json`
C#CC# / help
10mo ago
Appsettings.json across projet
C#CC# / help
2y ago
Correct environments handling (appSettings.json)
C#CC# / help
3y ago