部署 MS Dynamics CRM 插件 - 缺少程序集
我已按照此链接中的步骤操作,并创建了一个插件: http://msdn.microsoft.com/en-us/library/bb955365。 aspx
我已将其注册到我的实体之一的检索消息上,但是当它触发时,我收到此错误:
Web 服务插件失败于 组织ID: a2dcffbc-e056-4971-adfb-662979139800; SdkMessageProcessingStepId: 5b6921b8-192e-e011-846c-001d0928c4ac; 实体名称:new_csvproiect;阶段:50; 消息名称:检索;组件名称: MSDynCRMPlugin.Plugin, MSDynCRMPlugin, 版本=1.0.0.0,文化=中立, 公钥令牌=a6a43dc7a3dcc61d; 类名:MSDynCRMPlugin.Plugin;
异常:未处理的异常: System.IO.FileNotFoundException:可以 不加载文件或程序集 'System.Web.Services,版本=4.0.0.0, 文化=中立, PublicKeyToken=b03f5f7f11d50a3a' 或 它的依赖项之一。系统 找不到指定的文件。在 MSDynCRMPlugin.Plugin.Execute(IPluginExecutionContext 上下文)在 Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext 上下文)
有什么想法吗?
I have followed the steps from this link, and created a plugin:
http://msdn.microsoft.com/en-us/library/bb955365.aspx
I have registered it on a Retrieve message for one of my entities, but when it triggers I get this error:
Web Service Plug-in failed in
OrganizationId:
a2dcffbc-e056-4971-adfb-662979139800;
SdkMessageProcessingStepId:
5b6921b8-192e-e011-846c-001d0928c4ac;
EntityName: new_csvproiect; Stage: 50;
MessageName: Retrieve; AssemblyName:
MSDynCRMPlugin.Plugin, MSDynCRMPlugin,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a6a43dc7a3dcc61d;
ClassName: MSDynCRMPlugin.Plugin;Exception: Unhandled Exception:
System.IO.FileNotFoundException: Could
not load file or assembly
'System.Web.Services, Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system
cannot find the file specified. at
MSDynCRMPlugin.Plugin.Execute(IPluginExecutionContext
context) at
Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext
context)
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
确保您的插件项目设置为针对 .NET 4 框架,而不是 .NET 4 Client Profile 框架。在 Visual Studio 2010 中,新项目的默认设置似乎是 .NET 4 Client Profile。
我认为对 System.Web.Services 的引用将在 .NET 4 Client Profile 下编译,但在运行它们时实际上将无法执行。
Make sure that your plugin project is set to target the .NET 4 framework, NOT The .NET 4 Client Profile framework. With Visual Studio 2010, the default for new projects appears to be .NET 4 Client Profile.
I think that references to System.Web.Services will compile under .NET 4 Client Profile, but will actually fail to execute when you run them.
您需要将外部程序集合并到您的插件 dll 中。以下是您应遵循的说明: 将 ILMerge 与 CRM 结合使用插件程序集
You'll need to merge outside assemblies into your plugin dll. Here are the instructions you should follow: Using ILMerge with CRM Plugin Assemblies
使用此代码:
Use this code: