Previous Next

Thread: Skip deployment of empty folders

Last post 06-12-2008 3:03 PM by ksingla. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 06-12-2008, 12:46 PM

    • jnapier
    • Not Ranked
    • Joined on 09-09-2002, 7:44 PM
    • Posts 2

    Skip deployment of empty folders

    Is it possible to skip/deployment of or delete empty folders.  Im using Asp.net Web Deployment projects which leave behind empty folders after the compilation process if for example that folder contained a bunch of user controls.  I would like to not deploy these empty folders to the destination.

    Thanks for any help. 

  • 06-12-2008, 3:03 PM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 491

    Re: Skip deployment of empty folders

    Hi jnapier,

    Yes, it is possible to skip empty folders. You can use skip rule and identity empty folders using a xpath expression. You will need a skip rule like suggested below.

    -skip:xpath=//dirPath[count(*)=0]

    Above rule tells msdeploy to skip any dirPath elements which has 0 child elements.

    Thanks,
    Kanwal

Page 1 of 1 (2 items)
Page view counter