Visual Studio natively supports adding custom config transforms for web.config. Is there a way to do the same thing for a custom config file? For instance, the shop I'm at has an EnvironmentConfigs
directory in the root of the project and there are custom appSettings.config
and connectionStrings.config
files. Is there a way to do the same thing that web.config does and add appSettings.Release.config
and connectionStrings.Release.config
transformation files that will transform them on publish?
C# – How to add config transform for custom config file
asp.netcnetvisual studioweb.config
Related Topic
- Visual-studio – How to add an existing directory tree to a project in Visual Studio
- C# – How to remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning
- Visual-studio – App.Config Transformation for projects which are not Web Projects in Visual Studio
- C# – Try-catch speeding up the code
- Visual-studio – Error ‘LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt’ after installing Visual Studio 2012 Release Preview
- Visual-studio – Can you force Visual Studio to always run as an Administrator in Windows 8
- Scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found
Best Answer
I'm not sure about config's like that, but check out the Slow Cheetah extension in VS2010. You can install it by going to the Tools > Extension Manager and search the Online Gallery. It adds the ability to use config transforms for App.Config's and possibly will work in the scenario you describe. It adds a lot of transform functionality in general (even to web.config's) so it's a great tool to use. Out of the box, VS2010 will not do that, though.
Edit: According to the description for SlowCheetah: "This package enables you to transform app.config or any other XML file based on the build configuration". So yes, it seems it will do what you need...