I am developing an Office Addin for excel using Visual Studio 2019. I have different settings like API urls, default user etc for debug and release. I want to save these settings in web.debug.config and web.release.config and let visual studio pick settings from the relevant file based on whether I am running project in debug or release mode. Or if it is not possible to do read web.config file in JS, then is there a way to know if application is running in debug or release mode, so that I set these values accordingly.
Asked
Active
Viewed 85 times
1 Answers
2
You can use a standard web.config file. This is a standard file for configuring a web application (which is actually what an Office add-in is) that is hosted on the IIS/ASP stack.
In the pre-build or post-build actions you may copy an appropriate content/file to the output folder and use different content or configuration that way.

Eugene Astafiev
- 47,483
- 3
- 24
- 45