Introduction¶
The Imprevis plugin framework is designed to simplify plugin development for Microsoft Dataverse, enabling you to build, test, and deploy plugins more efficiently. This is done via the Imprevis.Dataverse.Plugins NuGet package which abstracts away common boilerplate code and reduces setup complexity -- allowing you to focus on implementing business logic.
Getting Started¶
Getting started using the Imprevis plugin framework is very easy.
-
First, create a new project directory and initialize a new plugin project in it using the Power Platform CLI.
-
Open the
.csprojis Visual Studio. -
Add the
Imprevis.Dataverse.PluginsNuGet package. -
Remove the
PluginBase.csfile as it is not needed. -
Update the
Plugin1.csclass to use the Plugin base and PluginRunner provided by theImprevis.Dataverse.Pluginspackage.namespace Sample.Plugins { using Imprevis.Dataverse.Plugins; using Imprevis.Dataverse.Plugins.Extensions; using Microsoft.Xrm.Sdk; public class TestPlugin : Plugin<TestPluginRunner> { } public class TestPluginRunner : IPluginRunner { public TestPluginRunner(IPluginExecutionContext context) { Context = context; } public IPluginExecutionContext Context { get; } public void Execute() { // Do something! } } } -
Build the project, which will generate a
.nupkgfile. -
Register the package in your Dataverse environment using the Plugin Registration Tool.
-
That's it! There are a lot of other features included by the framework to improve your life as a developer writing plugins for Microsoft Dataverse.