![](/img/trans.png)
[英]C# Could not load file or assembly 'Microsoft.SharePoint.Library'
[英]Could not load file or assembly 'Microsoft.SharePoint.Library' which I've never added
我一直在開發一個與 SharePoint Online 實例連接的 .NET Web 應用程序。 一切順利,直到我突然開始收到以下錯誤
Could not load file or assembly 'Microsoft.SharePoint.Library, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
這是我從未添加到項目中的文件或程序集。 我只通過 NUGET 添加了以下 SharePoint 包
任何幫助將不勝感激。
更新
安裝的 SharePoint Server 2013 客戶端組件 SDK 包括以下內容
Microsoft.Office.Client.Education.dll
Microsoft.Office.Client.Policy.dll
Microsoft.Office.Client.TranslationServices.dll
Microsoft.SharePoint.Client.dll
Microsoft.SharePoint.Client.DocumentManagement.dll
Microsoft.SharePoint.Client.Publishing.dll
Microsoft.SharePoint.Client.Runtime.dll
Microsoft.SharePoint.Client.Search.Applications.dll
Microsoft.SharePoint.Client.Search.dll
Microsoft.SharePoint.Client.Taxonomy.dll
Microsoft.SharePoint.Client.UserProfiles.dll
Microsoft.SharePoint.Client.WorkflowServices.dll
不幸的是,沒有 Microsoft.SharePoint.Library。
更新
終於解決了問題。 項目的bin文件夾下有一個SharePoint.dll,刪除后項目可以正常運行。
您添加的一些庫,例如SharePoint.Client
依賴於Microsoft.SharePoint.Library
安裝 Sharepoint 客戶端組件應該可以消除該錯誤。 從 這里下載
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.