跳过msdeploy中的规则

跳过msdeploy中的规则,第1张

概述我正在向msdeploy传递几个跳过参数,以便不同步(删除和更新)某些目录和文件 -skip:skipAction='Update',objectName='filePath',absolutePath='.*\\documents\\.*' 它似乎不起作用,一些目录和文件被删除. 我非常确定给出absolutePath的正则表达式没有问题 任何人都可以请清楚匹配如何适用于跳过规则? 显然根据正则 我正在向msdeploy传递几个跳过参数,以便不同步(删除和更新)某些目录和文件

-skip:skipAction='Update',objectname='filePath',absolutePath='.*\documents\.*'

它似乎不起作用,一些目录和文件被删除.
我非常确定给出absolutePath的正则表达式没有问题

任何人都可以请清楚匹配如何适用于跳过规则?
显然根据正则表达式和objectname不起作用.

解决方法 看这里:

http://forums.iis.net/p/1192163/2031814.aspx#2031813

The way skip rules are applIEd is based on the order of the synchronization operation(delete,update,add) is done on the actual object(directory or file).

For example,if there’s a delete operation on the directory,the skip rules for files within the directory for the delete operation will NOT PREVENT files from being get DELETED!

In my case,the directory MySite\MobileForms get deleted entirely. The skip rule I set for the files is useless.

And for the directory,my mistake is in the regular Expression:

-skip:skipAction='Delete',objectname='dirPath',absolutePath='.*\MobileForms\.*'

Should be:

-skip:skipAction='Delete',absolutePath='.*\MobileForms$'

which says that it should skip deleting directory path MobileForms(the first rule erroneously included slash in the regular Expression).

希望这对其他人也有帮助.

总结

以上是内存溢出为你收集整理的跳过msdeploy中的规则全部内容,希望文章能够帮你解决跳过msdeploy中的规则所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1063448.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-26
下一篇2022-05-26

发表评论

登录后才能评论

评论列表(0条)

    保存