Error occurred in deployment step ‘Activate Features’: Feature with Id ’ *** ’ is not installed in this farm, and cannot be added to this scope.

開發 event receiver 時,本來很直覺的就點選佈署要程式佈署進去 Sharepoint 站台,結果卻跳出這樣的錯誤

SharePoint 利用visual studio 部署失敗

查了很多文章,終於找到了方法,可以繼續使用 Visual Studio 上版,而不用改用 Power shell 來上版

首先,先到 sharepoint 專案的屬性頁後,點選SharePoint 分頁

將 Active Deployment Configuration 從 Default 修改成 No Activation ,之後存檔,就可以將 wsp 佈署上去站台

在这里插入图片描述接下來 開啟 SharePoint 2013 Central Administration

點擊『系統設定』
SharePoint 利用visual studio 部署失敗

點擊『管理伺服器陣列方案』)
SharePoint 利用visual studio 部署失敗

就會看到剛剛佈署上來的 test.wsp 專案
SharePoint 利用visual studio 部署失敗

點進剛剛 Visual Studio 佈署的專案後,再點擊 『部屬方案 』,即可設定排程將方案部屬
SharePoint 利用visual studio 部署失敗
最後一個步驟,就是將 Feature 開啟,透過瀏覽器開啟站台網址

因為我 Event receiver 的 scope 是建立成 web,所以我會在 Manage site features 找到剛剛 SharePoint 站台部屬的專案
SharePoint 利用visual studio 部署失敗
將此 Feature Active 即可

PS : 如果 scope 建立成 site,就必須到 Site collection features 來找到此 Feature

相关文章:

  • 2021-09-01
  • 2021-09-28
  • 2022-02-16
  • 2021-06-10
  • 2021-12-04
  • 2021-05-15
  • 2021-11-29
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案