Skip to content

Fix plgx compilation issue caused by version drift. - #486

Open
Fulgan wants to merge 5 commits into
Kyrodan:masterfrom
Fulgan:fix/plgx-loading
Open

Fix plgx compilation issue caused by version drift.#486
Fulgan wants to merge 5 commits into
Kyrodan:masterfrom
Fulgan:fix/plgx-loading

Conversation

@Fulgan

@Fulgan Fulgan commented May 4, 2026

Copy link
Copy Markdown

plgx loading has been broken since the June 2024 dependency bump (issue #485 )

The plgx file works by shipping the project's source code plus all referenced DLLs; KeePass extracts everything to a temp folder and runs csc.exe against it on first load. That compile pass only sees what PlgxTool bundled — it does not read app.config, so the binding redirects that normally smooth over transitive dependency version mismatches at runtime are not applied.
Since c750b72 ("Updated dependencies") this has been a problem for several reasons that all reduce to the same shape:

  • System.Net.Http is bundled at version 4.1.1.3 (from System.Net.Http 4.3.4's lib/net46), but Microsoft.Graph.Core 3.1.12 was compiled against 4.2.0.0 — csc raises CS1705. .NET Framework 4.7.2+ already includes 4.2.0.0 in the reference assemblies; the NuGet package isn't needed for net48.
  • Google.Cloud.Storage.V1 4.10.0 was compiled against Google.Apis.Storage.v1 1.67.0.3365 while the project ships 1.68.0.3431. Same metadata-level mismatch: at runtime an app.config redirect would handle it, at plgx-compile time it doesn't and csc errors.

What this PR changes

  • Removes the System.Net.Http 4.3.4 NuGet package and replaces the versioned reference with a bare . csc then resolves to the framework's 4.2.0.0, which is what Microsoft.Graph.Core expects.
  • Bumps Google.Cloud.Storage.V1 4.10 → 4.11 (and the cascade: Google.Apis.Storage.v1 1.68.0.3431 → 1.68.0.3604, Google.Api.Gax and Google.Api.Gax.Rest 4.8 → 4.9) so every package's compile-time metadata agrees on the same 1.68.x baseline. No binding redirects required.
  • Adds test-plgx.ps1, a script that builds Release, deploys the plgx to a portable KeePass install, runs KeePass --debug, and reports whether the plgx compiled cleanly. Default behavior is non-destructive; pass -Cleanup to also wipe %LOCALAPPDATA%\KeePass\PluginCache (useful when iterating on dependency fixes).

Edit: netstandard was actually already referenced. my mistake

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