Use local transformed appsettings.json, but exclude it from deployment to Azure

314 Views Asked by At

When using SlowCheetah to transform appsettings.json you must use the option to Copy to Output Directory for the transforms to actually be transformed.

This works just fine during local testing. The appsettings.json is transformed and copied to the output directory. However, for deploying to Azure you don't want to publish any appsettings.json files (as the values will be read from the App Service's configuration), and seeing as the file is actually copied to the output directory it seems to follow that it would also be copied to Azure.

How can I use the SlowCheetah transforms locally, while at the same time not deploying them to Azure?

0

There are 0 best solutions below