-
Notifications
You must be signed in to change notification settings - Fork 16
vsix command add crmpluginregistration
PhuocLe edited this page Jun 20, 2026
·
2 revisions
Add CrmPluginRegistration adds or updates CrmPluginRegistration attributes on the current plugin or workflow class by reading Dataverse registration metadata.
| Field | Value |
|---|---|
| Command class | CommandAddCrmPluginRegistration |
| Command id | CommandAddCrmPluginRegistration |
| Menu text | Add CrmPluginRegistration |
The command is visible when the cursor is inside a non-abstract C# class that DevKit recognizes as a plugin or workflow class.
It appears from the code editor context menu.
| Requirement | Why |
|---|---|
| Shared project exists | Generated registration attributes depend on shared DevKit code. |
| Current project references the Shared project | The current class must compile with shared types. |
DynamicsCrm.DevKit.Cli is installed |
The command uses registration attribute types from the CLI package. |
| Dataverse connection is available | The command reads plugin/workflow registration metadata from Dataverse. |
- Gets the current C# class under the cursor.
- Verifies the Shared project exists and is referenced by the current project.
- Verifies the CLI package is installed.
- Detects whether the class is a plugin or workflow.
- Connects to Dataverse.
- Finds existing registered steps for the class.
- Generates
CrmPluginRegistrationattributes. - Adds missing attributes or updates existing attributes with Dataverse step IDs.
If a class already has CrmPluginRegistration attributes without IDs, the command updates those attributes with IDs from Dataverse when it can match the registered step.
If no Dataverse step is found for the class, the command shows an error instead of adding speculative attributes.