Files
SebM 3b1d1aa525 review: harden IsInstalled() with assembly version checks
Address PR review: file-existence alone treats a stale v4 of
System.Runtime.CompilerServices.Unsafe (or any other downgraded plugin) as
"installed" and silently masks the bootstrap failure this PR is meant to fix.

Read each on-disk DLL's manifest via AssemblyName.GetAssemblyName(...).Version
and compare to the NuGet entry's declared version; if the file is older than
declared or its manifest can't be read, return false so Install() rewrites it.
Applied uniformly to all entries (defense-in-depth, per the optional suggestion
in the review).

Notes:
- System.Version comparison handles "6.0.0" (Revision=-1) vs "6.0.0.0"
  (Revision=0) correctly: the higher-revision actual passes; a stale v4 fails.
- AssemblyName.GetAssemblyName only reads the manifest, no assembly load into
  the AppDomain, so this is cheap and side-effect-free.
- Validated locally: with the v6 DLL in Plugins/Roslyn/, IsInstalled returns
  true; manually swapping in a v4 placeholder causes it to return false and
  Install() proceeds.
2026-05-09 12:05:00 +02:00
..