无法在Office 365上为Sharepoint应用程序开发加载文件或程序集'Microsoft.SharePoint.Client.UserProfiles? [英] Could not load file or assembly 'Microsoft.SharePoint.Client.UserProfiles on office 365 for Sharepoint apps developemnt?

查看:65
本文介绍了无法在Office 365上为Sharepoint应用程序开发加载文件或程序集'Microsoft.SharePoint.Client.UserProfiles?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我写了一个使用其中一个的SharePoint 2013应用程序客户端程序集(Microsoft.SharePoint.Client.UserProfiles)用于查询主机Web。 当我调试它并且它在IIS Express中启动时应用程序正常工作,但是一旦我将其部署到Office 365,应用程序
就会加载,但会抛出以下错误:


< p style ="color:#43515b; font-size:13px; font-family:'Segoe UI'; line-height:normal">
无法加载文件或程序集'Microsoft.SharePoint.Client.UserProfiles, Version = 15.0.0.0,Culture = neutral,PublicKeyToken = 71e9bce111e9429c'或其依赖项之一。系统找不到指定的文件。 



 



在我看来,在部署该应用程序的Azure服务器上找不到此程序集。 我很确定这是SharePoint 2013应用程序中预期会使用的典型程序集(以及搜索和所有其他程序集)。 
我错了吗? 是否有任何解决方案




shiv

解决方案

我刚才有与Microsoft.SharePoint.Client.Search类似的问题。查看属性以供Web项目中的参考,我的Microsoft.SharePoint.Client.Search设置'CopyLocal = false',将其更改为'true'导致程序集与另一个一起部署到Azure的
我引用的程序集。这立即解决了我的问题。


I wrote a SharePoint 2013 app that uses one of the client assemblies (Microsoft.SharePoint.Client.UserProfiles) to query the host web.  The app works fine when I debug it and it fires up in IIS Express, but as soon as I deploy it to Office 365, the app loads up but throws the following error:

Could not load file or assembly 'Microsoft.SharePoint.Client.UserProfiles, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. 

 

It seems to me that this assembly cannot be found on the Azure servers that the app is deployed to.  I'm pretty sure this is one of the typical assemblies that are expected to be used (along with Search and all the others) in a SharePoint 2013 app.  Am I wrong?  Is there any solution to do this


shiv

解决方案

I just had a similar issue with Microsoft.SharePoint.Client.Search. Look at the Properties for your reference in the web project, mine had Microsoft.SharePoint.Client.Search set 'CopyLocal=false', changing that to 'true' caused the assembly to be deployed to Azure along with the other assemblies I had referenced. This immediately fixed my issue.


这篇关于无法在Office 365上为Sharepoint应用程序开发加载文件或程序集'Microsoft.SharePoint.Client.UserProfiles?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆