Skip to content

refactor(logic): remove SqlServer compile-time dependency via reflection - #76

Draft
ormico wants to merge 1 commit into
mainfrom
feature/fix-sqlserver-reference
Draft

ormico wants to merge 1 commit into
mainfrom
feature/fix-sqlserver-reference

Conversation

@ormico

@ormico ormico commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Summary

Removes the compile-time NuGet package reference to Ormico.DbPatchManager.SqlServer from the Logic project. The Logic project acts as a plugin host and should not have compile-time dependencies on specific database plugins.

Changes

  • Logic.csproj: Removed PackageReference Include="Ormico.DbPatchManager.SqlServer" Version="2.2.0"
  • PluginManager.cs: Updated SqlServer plugin loading to use reflection (Assembly.Load + Activator.CreateInstance) matching the existing dynamic plugin pattern for custom plugins

Benefits

  1. Loose coupling: Logic no longer requires SqlServer at compile time
  2. Reduced package bloat: Consumers of the Logic NuGet package no longer pull in transitive dependencies (Microsoft.Data.SqlClient, Azure.Identity, Microsoft.Identity.*)
  3. Architecture consistency: SqlServer loading now matches the existing dynamic plugin loading pattern

Verification

  • Logic project builds successfully
  • Full solution builds (pre-existing test errors in PatchManagerEmptySqlTests.cs are unrelated to this change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant