web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Plugin Structure Best Practice

(3) ShareShare
ReportReport
Posted on by 61

Hi,

What is the best practice for a Plugin Structure? Is it best to have a dll that contains all the plugins? Or separate dll for each entity?

Let say I have a plugin for Account, Contact, and Case Entity. is it better to have 1 dll that contains all of them or 3 dlls (1 per entity?) Thanks.

Regards,

Anthony Steven

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    In the scenario you have mentioned, it is better to have 1 single assembly which contains all your plugins. Creating assembly for each entity is not a good idea however if you have some kind of common functionality which doen't depend on entities then you may think of wrappig that in a separate assemble.  

    For me, it is always... one client => one plugin assembly & one custom workflow assembly :)

    Hope this helps.

  • Anthony2885 Profile Picture
    61 on at

    Thanks Ravi,

    May I know the primary reasoning behind it? Is it performance? or more on maintanability? Thanks

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Performance of the plugin will not change. It is purely maintainability and your own standards/ practice.

  • Suggested answer
    Arsen Aghajanyan Profile Picture
    221 on at

    Hi Anthony,

    Using 1 .dll for all of your plugins makes it easier to wrap some custom logic like utility functions, helper methods, etc. into separate classes and use them anywhere in the code. This is not possible in case of multiple .dll's because Dynamics online does not let you reference external .dlls. This leads to violation of DRY in your code.

    On the other side, having multiple .dlls (logically structured) is more maintainable in my opinion and easier to extend adding more functionality. Additionally, it allows your team to simultaneously work on multiple plugins without overwriting each other (For example one can write a new plugin for Account entity, while the other is updating something on Agreement entity)

    The way we're structuring depends on the project size. If it's a big project with lots of custom logic (30-40 plugins +) we're using multiple .dlls. In the case of smaller projects 1 .dll should be sufficient.

    I should also add that the FS module (which is quite big) developed by Microsoft itself is just one .dll. So probably this is how MS structures it.

    Hope this helps :)

    Regards,

    Arsen.

  • kalluu91 Profile Picture
    40 on at
    If you don't have too many plugins, it's best to put all plugins in a single dll.
     
    If you have multiple developers working on the same plugin, check this article for the plugin structure: https://kalcancode.wordpress.com/2025/02/14/power-apps-development-lifecycle-for-a-team-part-1/
     
    Cheers,
    Kim Anh
  • Suggested answer
    Mohamed-Elgharably Profile Picture
    2 on at
    If you’re exploring modern best practices for Dataverse plugins, I recently published a full guide that breaks down a clean, test-friendly plugin architecture (Core → Infrastructure → Plugins), minimal DI, NuGet packaging with PAC CLI, and optional Early-Bound support.
    It’s a complete template you can drop into real projects — not just theory.
     

    Hope it helps — and happy to discuss any part of it!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Subra Profile Picture

Subra 124

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 98 Super User 2026 Season 1

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 85 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans