Plugin Solution Architecture in Dynamics 365: DLL-Based vs Plugin Package-Based Approaches

As the Dynamics 365 and Power Platform landscape evolves rapidly, so does the way we extend the platform using custom code. One significant shift is the movement from traditional DLL-based plugin deployment to the more modern Plugin Package approach.

In this post, we’ll dive deep into the architecture differences, evaluate the pros and cons of both models, and offer practical insights into which is best suited for today’s Power Platform development, and what the future may hold.


🔧 The Legacy Approach: DLL-Based Plugin Assemblies

📦 How It Works:

  • Developers build a class library (.NET DLL).
  • The DLL is manually registered using tools like Plugin Registration Tool, XrmToolBox, or custom DevOps scripts.
  • Registered under “Assembly”, with each plugin class and step mapped individually.

✅ Pros:

  • Simple and familiar for long-time developers.
  • Quick to deploy for small projects or minor changes.
  • Granular control of individual plugin steps.

❌ Cons:

  • No dependency management—you must manually handle referenced DLLs.
  • Difficult to scale—multiple plugins and types can become hard to manage.
  • Environment-specific challenges—debugging and ALM practices can vary across environments.
  • No packaging standard—plugins feel disconnected from solution-centric ALM models.

🚀 The Modern Way: Plugin Packages (Isolated Mode)

📦 How It Works:

  • Plugins are built into a NuGet-style package, optionally with dependencies.
  • They are registered using solution-aware deployment, typically bundled in a solution file.
  • Supports Isolated Mode (Sandbox) for security, and can run using Azure Functions-style hosting in Dataverse.

✅ Pros:

  • Fully ALM-compliant—can be part of a managed/unmanaged solution.
  • Supports dependencies—via NuGet or embedded libraries.
  • Supports preloading, assembly versioning, and easier rollback.
  • Improved security and isolation in sandboxed mode.
  • Ready for DevOps and CI/CD pipelines using tools like PAC CLI or GitHub Actions.

❌ Cons:

  • Learning curve for those used to the old way.
  • More upfront configuration—you need to define a manifest file (pluginpackage.dll, pluginpackage.json).
  • Limited documentation/examples—although improving, it’s not yet as widely adopted.

⚖️ DLL vs Plugin Package: A Quick Comparison

FeatureDLL-Based AssemblyPlugin Package-Based
ALM SupportManual or semi-automatedFully solution-aware
Dependency ManagementManualNative support via packaging
Isolation & SecurityBasic sandboxingEnhanced sandboxing, isolation
CI/CD ReadyRequires custom scriptingSeamless with Power Platform tooling
Ease of DebuggingEasier locallyRequires setup for remote debugging
Performance (Cold Start)FasterSlower, unless preloaded
Version ControlManual trackingSemantic versioning supported
Fit for Large ProjectsBecomes messyHighly scalable and modular

🔮 What’s Best for the Present and Future?

The Plugin Package approach is clearly aligned with Microsoft’s Power Platform vision:

  • It’s solution-centric, meaning it fits right into managed environments and modern DevOps pipelines.
  • It’s designed to support scalable enterprise applications with multiple plugins, dependencies, and deployment environments.
  • With ALM, security, and DevOps-first thinking, Plugin Packages are future-proof.

That said, DLL-based plugins still work well for:

  • Quick POCs or time-bound enhancements.
  • Single-environment, low-complexity projects.
  • Developers not yet set up for full DevOps workflows.

👨‍💻 Developer Insight: When to Choose What?

ScenarioRecommendation
Rapid prototyping or small team setupDLL-Based Plugin
Enterprise-level multi-env deploymentPlugin Package
Heavy use of external libraries or dependenciesPlugin Package
Need tight integration with DevOps/ALM pipelinesPlugin Package
Working on legacy solutions or single updateDLL-Based Plugin

The Plugin Package model isn’t just a technical upgrade, it’s a philosophical shift in how we build for the Power Platform. It encourages cleaner architecture, modular deployment, and aligns beautifully with the platform’s push toward automated, secure, and scalable app development.

If you’re not already exploring Plugin Packages, now is the time to start. The tooling is mature enough, and the benefits far outweigh the initial learning curve.


📣 What’s Your Take?

Are you still using DLLs or already adopting plugin packages in your DevOps pipelines? What challenges have you faced during the transition?

Let’s discuss in the comments 👇

2 thoughts on “Plugin Solution Architecture in Dynamics 365: DLL-Based vs Plugin Package-Based Approaches

  1. Something I learned this weekend in regard to using Plugin Packages for Managed Identity in Power Platform. You need to code sign the nupkg instead of the individual plugins. You can do that using the dotnet nuget sign tool. You still need to strong sign each DLL with a snk file just like you were probably doing anyway 🙂

    dotnet nuget sign “Package Path” –certificate-path yourcert.pfx –certificate-password “” –hash-algorithm SHA256dotnet nuget sign command – .NET CLI | Microsoft Learn

    Learn more about connecting to Azure Resources in Power Platform plugins using MI here: How to Secure a Dataverse Plug-in with Managed Identity using Plugin Identity Manager for XrmToolBox – It Must Be Code!

    Like

Leave a comment