diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-08-14 18:00:29 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-08-14 18:00:29 +0900 |
| commit | a8233adff75a4726015c7c96ce5e864d4506f6b2 (patch) | |
| tree | 8ce06e1bc5d605b9681259260c99a47921e65413 /src/Agent.Windows/Diagnostics | |
| parent | e07183ee6d3e57da325213e898cdcd6687320f53 (diff) | |
Unify the public product name and repository identifier while preserving stable executable, store, AppContainer, namespace, pipe, and mutex identifiers.
Make Directory.Build.props VersionPrefix the application-version source of truth, use SDK-generated assembly metadata, and compare helper compatibility by parsed major/minor/build release identity.
Rebuild the fixed winagent-sandbox-mcp release staging directory from clean defaults, emit versioned ZIP/checksum assets, verify manifests and fresh extraction, and reject local configuration, user state, and test artifacts.
Document release/deployment separation and upgrade responsibilities, add the initial changelog, update operational script paths, and record the v0.1.0 verification results.
Diffstat (limited to 'src/Agent.Windows/Diagnostics')
| -rw-r--r-- | src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs b/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs index 89a2106..32086d3 100644 --- a/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs +++ b/src/Agent.Windows/Diagnostics/WindowsPlatformCheck.cs @@ -36,9 +36,9 @@ public static class WindowsPlatformCheck bfe = true; if (helper) { - string current = Assembly.GetEntryAssembly()?.GetName().Version?.ToString(3) ?? ""; + Version? current = Assembly.GetEntryAssembly()?.GetName().Version; string candidate = FileVersionInfo.GetVersionInfo(helperPath).FileVersion ?? ""; - version = candidate.StartsWith(current, StringComparison.Ordinal); + version = current is not null && HasSameReleaseIdentity(current, candidate); } return new(platform, profile, bfe, helper, version, null, null); } @@ -47,6 +47,12 @@ public static class WindowsPlatformCheck { return new(platform, profile, bfe, helper, version, ex.HResult, ex.Message); } } + internal static bool HasSameReleaseIdentity(Version current, string candidate) + { + if (!Version.TryParse(candidate, out Version? parsed)) return false; + return current.Major == parsed.Major && current.Minor == parsed.Minor && current.Build == parsed.Build; + } + private static FwpmEngineClose0SafeHandle OpenBfeReadOnly() { uint result = PInvoke.FwpmEngineOpen0(10, null, null, out FwpmEngineClose0SafeHandle engine); |
