-1

I am looking for some guidance on the standard way of implementing plugins in D365 CE or what Microsoft recommends.

I generally follow this practice -
1. Have only 1 CRM Solution and one plug-in assembly (DLL) for all these plugin steps.
2. Have a separate ".cs" file for each plugin in this project.
3. Each plugin corresponds to specific functionality. So in case, we want to disable any functionality, it could be easily done without changing the code.
4. Have only 1 CRM Solution for all these plugins.

Looking forward to some expert guidance.

Thanks!

1 Answers1

0

In this video former MVP Mitch Milam talks three plugin solution layout options. He recommends the approach you outline above, and that is the one I typically use.

I also generally use a Console app to test and debug plugins. For maximum flexibility, I often put all the business logic into a Visual Studio shared project. Then I reference that shared project from both the plugin project and the Console App.

While the Console app could reference a DLL, having the logic in a shared project easily allows me to also use the logic in a workflow project if I want. Ultimately, the shared project gives me the option run the code as a plugin, a workflow, or a Console app.

Here's an example:

VS layout

The .Cmd project is the console app. The one with the double diamond icon is the shared project (which cannot be compiled on its own - it must be referenced by one or more compilable projects).

Aron
  • 3,877
  • 3
  • 14
  • 21