visual studio 2010 - Ignore file from delete during WebDeploy -


i'm using teamcity build , deploy collection of mvc applications via msbuild , webdeploy.

in step previous solution build/deploy, copy app_offline.htm deploy directory can perform sql updates , other web/solution management steps including build.

one of setting in webdeploy delete files aren't included in project, or not needed run site. deletes app_offline.htm file each time. while understand kind of desired result, there way exclude file being deleted deployment directory upon deploy?

i've tried adding itemgroup excludefrompackagefiles option, no results.

i had similar problem, wanting keep minified javascript files in deployment package though they're not part of project.

i added custom msbuild target this, works me:

<!-- ====== package minify files ===== -->   <propertygroup>   <copyallfilestosinglefolderforpackagedependson>     customcollectfiles1;         $(copyallfilestosinglefolderforpackagedependson);   </copyallfilestosinglefolderforpackagedependson>  </propertygroup>   <propertygroup>    <afteraddiissettingandfilecontentstosourcemanifest>     makeemptyfolders    </afteraddiissettingandfilecontentstosourcemanifest>  </propertygroup>  <target name="customcollectfiles1">   <itemgroup>    <!-- =====controls\javascript folder ==== -->     <_customfilesforrootfolder include=".\controls\javascript\*.min.js">     <destinationrelativepath>%(recursivedir)%(filename)%(extension)    </destinationrelativepath>    </_customfilesforrootfolder>   <filesforpackagingfromproject include="%(_customfilesforrootfolder.identity)">     <destinationrelativepath>.\controls\javascript\%(recursivedir)%(filename)%(extension)</destinationrelativepath>   </filesforpackagingfromproject>  </itemgroup>  </target> 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -