创建单一的CRM插件DLL以存储在CRM数据库 [英] Creating a single CRM plugin DLL to store in the CRM database

查看:449
本文介绍了创建单一的CRM插件DLL以存储在CRM数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于MS CRM存储插件建议的方式是通过CRM数据库,我想是时候做一些事情我目前使用的方法,它是存储在磁盘上的DLL文件。

Since the suggested way of storing plugins in MS CRM is via the CRM database, I figured it's about time to do something about the method I'm currently using, which is storing the DLLs on the disk.

然而麻烦的是,我不知道如何嵌入所有由该DLL所需要的其它各种位:本地化的资源文件(这些文件存放在另一个文件夹)和一些参考从最新的SDK的DLL(其必须手动放置在bin\assembly文件夹)。在这一点上,我甚至完全肯定这是可能的。

The trouble however is that I don't know how to embed all the other various bits that are needed by the DLL: the localization resource files (which are kept in another folder) and some referenced DLLs from the latest SDK (which had to be manually placed in the bin\assembly folder). At this point, I'm not even entirely sure this is possible.

到目前为止,我已经尝试通过改变资源文件生成操作来解决定位问题到内容或资源和测试该溶液(仍保持在磁盘上的位置,但没有加入本地化文件夹)。这不工作:当我故意在插件之一发生了验证错误,我尽管有在CRM中选择不同的语言得到了默认语言信息(英文)

So far I've tried to solve the localization problem by changing the build action on the resource files to "Content" or "Resource" and tested this solution (still keeping the location on-disk, but without the added localization folder). This didn't work: when I purposely generated a validation error in one of the plugins, I got the default language message (English) despite having a different language selected in the CRM.

尝试添加一些引用的DLL文件(:xrm.portal,xrm.portal.files和xrm.client即新的SDK的DLL),当我遇到过类似的问题。当我试图给插件存储在数据库中(跳过了片刻本地化问题),我得到了一个CRM错误说,它不能找到XRM.Client装配或它的一个依赖关系。我知道我可以使用ILMerge把整个事情,但我有一个直觉告诉我这是不是真的是一个好主意。

I've faced a similar problem when trying to add some of the referenced DLL files (namely the new SDK DLLs: xrm.portal, xrm.portal.files and xrm.client). When I tried to store the plugin in the database (skipping for a moment the localization issue), I got a CRM error saying it cannot find the XRM.Client assembly or one of it's dependencies. I know I could use ILMerge to put the whole thing together, but I've got a gut feeling telling me this isn't really a good idea.

任何提示或在这个问题上的建议将是巨大的。

Any hints or suggestions on this issue would be great.

推荐答案

我们总是ILMerge我们的插件,并有与没有问题。我们没有在SDK中的dll合并,因为这些都已经在目标服务器上GACed。

We always ILMerge our plugins and have had no issues with that. We don't merge in the SDK dlls, because those will already be GACed on the target server.

我们并不真正做到本土化我们的插件dll文件里面,不过,所以我觉得你可能需要做的是,如果您当前的资源管理器是基于文件,以使其装配基础,只是从加载必要的资源是什么。

We don't really do localization inside our plugin dlls, though, so I think what you may have to do is, if your current resource manager is file based, to make it assembly based and just load up the necessary resources from that.

这篇关于创建单一的CRM插件DLL以存储在CRM数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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