0
我發現,試圖爲SharePoint項目引用某些SharePoint庫,我得到類似的錯誤創建假貨裝配時:無法創建一個SharePoint項目假貨裝配
Failed to load properly Derived method 'RequiresWebPartClientScript' in type 'Microsoft.Office.Server.Search.WebControls.ScriptWebPart' from assembly 'Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' cannot reduce access.
這通常發生在SharePoint項目引用不在庫中的GAC如:Microsoft.SharePoint.ApplicationPages和Microsoft.ApplicationPages.Administration