无法加载我从未添加过的文件或程序集“Microsoft.SharePoint.Library”
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法加载我从未添加过的文件或程序集“Microsoft.SharePoint.Library”相关的知识,希望对你有一定的参考价值。
我一直在开发一个与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包
- JohnHolliday.Caml.Net.SharePoint
- SharePoint.Client
- SharePoint.Client.Runtime
- SharePoint.client.search
任何帮助将不胜感激。
UPDATE
已安装的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。
UPDATE
终于解决了这个问题。项目的bin文件夹中有一个SharePoint.dll,一旦删除,该项目就能正常运行。
答案
您添加的某些库(例如SharePoint.Client
)依赖于Microsoft.SharePoint.Library
安装Sharepoint客户端组件应该删除该错误。从here下载
以上是关于无法加载我从未添加过的文件或程序集“Microsoft.SharePoint.Library”的主要内容,如果未能解决你的问题,请参考以下文章
无法加载文件或程序集“System.Windows.Interactivity”[重复]
无法加载文件或程序集“CefSharp.dll”或其依赖项之一
未能加载文件或程序集Microsoft.ReportViewer.WebForms, Version=10.0.0.0