是否可以增量發佈項目? 我試圖做到這一點通過以下方式:Sitecore增量發佈項目
var masterDatabase = Factory.GetDatabase("master");
var webDatabase = Factory.GetDatabase("web");
var contentItem = masterDatabase.GetItem("/sitecore/content/path to item");
PublishOptions options = new PublishOptions(
masterDatabase,
webDatabase,
PublishMode.Incremental,
Language.Current,
DateTime.Now)
{
RootItem = contentItem,
Deep = true
};
Publisher publisher = new Publisher(options);
publisher.PublishAsync();
,但我得到的最後一行出現以下錯誤:
「System.InvalidOperationException」類型的異常出現在Sitecore.Kernel .dll但未在用戶代碼中處理。 其他信息:根項不能用於增量發佈
的contentItem
變量指定是剷鬥,其包含其他bucketable物品。 有沒有辦法爲它做增量發佈?