0

I have an Web application with several deployment targets (DEV, PREPROD, PROD).I want visual studio to publish different version of a bunch of HTML and other static files by environnement. (the files have to be different when deploying on DEV or on PROD).

DEV:
MyWebSite\Content\Templates\Intro.html
MyWebSite\Content\Templates\IntroDEV.html

PROD:
MyWebSite\Content\Templates\Intro.html
MyWebSite\Content\Templates\IntroPROD.html

I can't apply transformations like for *.config files (with slowcheetah for example).

I'd like to replace Intro.html with IntroDEV.html when deploying on DEV and IntroPROD.html when deploying of PROD.

Is there any trick to do it ?

ToXinE
  • 308
  • 2
  • 13

1 Answers1

0

You can set the configuration of your project as Dev, Prod or preprod and can choose the target in your msbuild script accordingly.

in your msbuild script you can check the envirnoment and then can replace the file as required.

amit dayama
  • 3,246
  • 2
  • 17
  • 28
  • Is it a build event > post build script ? Do you have any examples of such a msbuild script ? – ToXinE Aug 31 '15 at 09:08