Skip to content

Better plugin file detection and safer plugin registration by prompting the user - #180

Merged
rezanid merged 2 commits into
mainfrom
improve-plugin-registration
Jul 24, 2026
Merged

Better plugin file detection and safer plugin registration by prompting the user#180
rezanid merged 2 commits into
mainfrom
improve-plugin-registration

Conversation

@rezanid

@rezanid rezanid commented Jul 24, 2026

Copy link
Copy Markdown
Owner

PR Classification

New feature and code improvement to ensure safe plugin removal and a better plugin file detection in Dataverse projects.

PR Summary

This PR introduces authoritative detection of removed plugin types, enhances user confirmation before deletion, and improves plugin detection and UI clarity.

  • PluginRegistrationService, CSharpXrmMetaDataService: Now detect and track all compiled plugin types, only offering deletion for those genuinely removed from the assembly.
  • GeneralOptions, RemovedPluginsDialog, IPluginRegistrationUI, VsPluginRegistrationUI: Added user prompt and dialog for confirming plugin deletions at the project level.
  • PluginDetectionHelper: Added for fast, syntax-only plugin detection to improve command visibility.
  • Tests: Updated and added tests for plugin detection, removal logic, and UI integration.
  • Upgraded XrmTools.Meta.Attributes NuGet package to 1.2.0 and improved solution/project dialog UI.

rezanid added 2 commits July 24, 2026 13:55
- Detect all compiled IPlugin implementations with Roslyn, independent of XrmTools annotations
- Delete Dataverse plugin types only when their classes are absent from the compiled assembly
- Preserve unannotated but still-compiled plugin type registrations
- Reconcile annotated steps, images, and Custom APIs independently of plugin-type membership
- Add Delete/Cancel confirmation for plugin types removed or renamed in code
- Treat cancellation as an expected status-bar outcome instead of an error
- Add an option to suppress the deletion confirmation and proceed with authoritative cleanup
- Show the registration command for files containing a [Plugin] attribute before code generation is enabled
- Use a lightweight syntax-only scan for command visibility without triggering Roslyn compilation
- Add unit coverage for compiled plugin discovery, cleanup decisions, and syntax-based plugin detection
@rezanid rezanid linked an issue Jul 24, 2026 that may be closed by this pull request
@rezanid rezanid self-assigned this Jul 24, 2026
@rezanid rezanid added the enhancement New feature or request label Jul 24, 2026
@rezanid
rezanid merged commit 8c15cfc into main Jul 24, 2026
2 checks passed
@rezanid
rezanid deleted the improve-plugin-registration branch July 24, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

1 participant