Dynamics CRM 2011-与不同实体相关的每个插件都必须具有自己的程序集吗? [英] Dynamics CRM 2011 - Does each plugin that related to a different entity have to have it's own assembly?

查看:90
本文介绍了Dynamics CRM 2011-与不同实体相关的每个插件都必须具有自己的程序集吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一系列相关的插件.每个插件用于不同的实体.每个插件都必须具有自己的程序集吗?我使用的是Visual Studio,并且在相同的解决方案中创建了另一个项目,但看不到注册工具中的新步骤.

I am creating a series of related plugins. Each plugin is for a different entity. Does each plugin have to have it's own assembly? I'm using Visual Studio and I created a second project within the same solution but I can't see the new step in registration tool.

谢谢

推荐答案

它可以但不必这样做.那几乎是您的设计决定.考虑一下是否有几个类都实现了IPlugin

It can do, but doesn't have to. That is pretty much your design decision. Consider if you had several classes all implementing IPlugin

public class MyFirstPlugin : IPlugin
{
    //implemented as per usual
}

public class MySecondPlugin : IPlugin
{
    //implemented as per usual
}

如果要在插件注册工具中注册该DLL,您将看到以下结构:

If you were to register that DLL in the plugin registration tool, you would see the following structure:

- Server
    - DLL
        - MyFirdtPlugin
        - MySecondPlugin

然后您可以根据需要向每个插件添加步骤.

You can then add steps to each plugin as desired.

另一种选择是每个DLL有一个插件,这将为您提供

The alternative would be to have one plugin per DLL, which would give you

- Server
    - DLL1
        - MyFirstPlugin
    - DLL2
        - MySecondPlugin

我必须承认这似乎有点过头了-但它还取决于您使用解决方案的方式.

I must admit it seems like overkill - but it can also depend on how you are using your solutions.

这篇关于Dynamics CRM 2011-与不同实体相关的每个插件都必须具有自己的程序集吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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