无法加载文件或程序集'Microsoft.Xrm.Client [英] Could not load file or assembly 'Microsoft.Xrm.Client

查看:203
本文介绍了无法加载文件或程序集'Microsoft.Xrm.Client的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 CRM中创建了一个插件。已成功注册。在插件内部,我创建了具有许多功能的Web服务。
成功调用插件步骤后,出现错误-

I have created a plug-in in CRM. It’s registered successfully. Inside my plug-in I have created a web service with many functions. After successful calling of plug-in step I am getting error-


System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.Xrm.Client,版本= 5.0.9689.2166,文化=中性,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。该系统找不到指定的文件。
为了解决此问题,我从crmsvcutil.exe创建了New XRM.cs文件,但遇到了同样的问题。搜索有关此内容的更多信息,但尚未找到解决方案。

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9689.2166, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies`. The system cannot find the file specified. To solve this issue I have created the New XRM.cs file from crmsvcutil.exe but got the same issue. Searched more about this but no solutions found yet.

注意:我正在使用Microsoft的托管版本CRM

NOTE: I am using the Microsoft hosted version of CRM

下面是我正在使用的参考文件。

Here below the reference files which I am using.


  • microsoft。 crm.sdk.proxy

  • Microsoft.CSharp

  • microsoft.xrm.client

  • microsoft.xrm.portal

  • microsoft.xrm.sdk

  • 系统

  • 系统System.Core

  • System.Data

  • System.Data.Services

  • 系统.Data.Services.Client

  • System.DirectoryServices.AccountManagement

  • System.Runtime.Serialization

  • System .ServiceModel

  • System.Xml

  • System.Xml.Linq

  • microsoft.crm.sdk.proxy
  • Microsoft.CSharp
  • microsoft.xrm.client
  • microsoft.xrm.portal
  • microsoft.xrm.sdk
  • System
  • System System.Core
  • System.Data
  • System.Data.Services
  • System.Data.Services.Client
  • System.DirectoryServices.AccountManagement
  • System.Runtime.Serialization
  • System.ServiceModel
  • System.Xml
  • System.Xml.Linq

有什么方法可以在托管版本的CRM上运行我的插件吗?

Is there any way to run my plugin on Hosted version of CRM???

感谢帮助:)

推荐答案

Micros oft.XRM.Client通常是 插件。

需要从外部应用程序连接到CRM。

自CRM 2016起,Microsoft.XRM.Client已从SDK中删除

Microsoft.XRM.Client is usually not needed by the plug-in.
It is needed to connect to CRM from an outside application.
Microsoft.XRM.Client has been removed from the SDK since CRM 2016.

插件不会自动解决项目中的依赖项,它们必须已经在服务器上。




如果插件需要Microsoft.XRM.Client,则可以将其放置在GAC中。

Plugins do not automatically resolve dependencies in your project, they have to already be on the server.

Microsoft.XRM.Client can be placed in the GAC if it is needed by the plugin.

Dynamics CRM 2015更新

NuGet包 Microsoft.CrmSdk.Extensions 包含Microsoft.Xrm.Client。

Update for Dynamics CRM 2015
The NuGet package Microsoft.CrmSdk.Extensions contains Microsoft.Xrm.Client.

Dynamics CRM更新2016和Dynamics 365

Microsoft.Xrm.Client不再是SDK的一部分。

NuGet包 Microsoft.CrmSdk.CoreAssemblies 包含插件开发所需的一切。

Update for Dynamics CRM 2016 and Dynamics 365
Microsoft.Xrm.Client is no longer part of the SDK.
The NuGet package Microsoft.CrmSdk.CoreAssemblies contains everything needed for plugin development.

Dynamics CRM SDK的各个部分都在NuGet中

NuGet比添加Dynamics CRM dll作为项目引用要好得多。尤其是在源代码控制和团队开发方面。

The various parts of the Dynamics CRM SDK are in NuGet.
NuGet is a much better solution than adding Dynamics CRM dlls as project references; especially for source control and team development.

这篇关于无法加载文件或程序集'Microsoft.Xrm.Client的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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