How to add a configuration config for a custom configuration file?

Visual Studio natively supports the addition of custom configuration transformations for web.config. Is there a way to do the same for a custom config file? For example, in the store where I am located, there is the EnvironmentConfigs directory in the root of the project, and there are user files appSettings.config and connectionStrings.config . Is there a way to do the same thing that web.config does and add the conversion files appSettings.Release.config and connectionStrings.Release.config that will convert them when published?

+6
source share
1 answer

I'm not sure about this configuration, but check out the Slow Cheetah extension in VS2010. You can install it by going to "Tools"> "Extension Manager" and search the online gallery. It adds the ability to use configuration transformations for App.Config and, possibly, will work in the scenario you describe. It adds many conversion functions in general (even to web.config), so it is a great tool to use. Because of this, VS2010 will not do this.

Edit: as described for SlowCheetah: "This package allows you to convert the app.config file or any other XML file based on the assembly configuration." So yes, it looks like it will do what you need ...

+3
source

Source: https://habr.com/ru/post/926564/


All Articles