microsoft / slow-cheetah

Tooling for XML and JSON file transforms on build from Visual Studio and MSBuild
Other
323 stars 67 forks source link

Output directory issue on Build vs Publish #81

Closed denious closed 7 years ago

denious commented 7 years ago

Running MVC5, I am attempting to transform a file at my root directory: appSettings.config. This file contains all application settings and is called via web.config > appSettings file="".

On Build, the transformed version is output inside the /bin directory. To adjust for this during debugging, I needed change my web.config appSettings path to "bin/appSettings.config". The file at the root level is un-touched.

On Publish, the transformed version remains at the root level, with the /bin directory containing a non-transformed file. This breaks the adjustment made above. The same issue applies to the ApplicationInsights.config file that is read from the /bin directory but is not transformed on publish.

How do I assure consistency in the /bin directory? I want it to always contain transformed versions.

denious commented 7 years ago

If anyone is looking for an answer, I solved this with Gulp and MSBuild tasks, here's my blog post about it: http://husp.net/gulping-slowcheetah-transforms/