Web Deployment Tool (MS Deploy)
Skip App_Data folder from publishing.
Last post Mar 06, 2018 08:42 AM by Yuk Ding
Mar 02, 2018 06:43 PM|Ananth Asamani|LINK
I was trying to deploy a site by skipping App_Data folder. Since I have log files which I need them.
How can I skip the folder.
I have used the following commands, it didn't help me out.
msdeploy -verb:sync -source:package=abc.Web.zip -dest:auto,computername="abc.local",username="abc",password="abc" -setParam:kind=ProviderPath,scope=iisApp,value="abc.com" -allowUntrusted
I have tried many combinations.
I appreciate if someone can help me out. thanks in advance.
Mar 05, 2018 07:03 AM|Yuk Ding|LINK
If you need to exclude App_Data, you could try this:
I can skip he App_Data from this command without any issue:
msdeploy.exe -verb:sync -source:apphostconfig="site2" -skip:Directory=\\App_Data -dest:package=c:\dws.zip
Mar 05, 2018 12:33 PM|Ananth Asamani|LINK
Thanks for the reply.
I have tried -skip:Directory\\App_Data, it throws me error.
I tried to replicate my production issue, I intentionally used a sample excel file, while the excel sheet has lock on it, I tried to deploy the site.
Here is the command which I used.
After lot of research I finally came up with this command.
msdeploy -source:package='C:\Jenkins\WebDeployPackages\Basic\Hello.zip' -dest:auto,includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParam:kind=ProviderPath,scope=iisApp,value="Default
Command says, we have to write multiple skip statements if you have multiple folders under "App_Data" folder.
I thought it would help someone without wasting their personal time on weekend, like I did.
Mar 06, 2018 08:42 AM|Yuk Ding|LINK
Thanks for sharing your experience. In addition, it would be appreciated if you could mark your solution as answer.