chore: sync alpha → alpha-backup (automated) - #3363
Merged
Merged
Conversation
…cFunctions` * Implemented #1738
…obalstaticvariables-into-new-globalstaticfunctions
…obalstaticvariables-into-new-globalstaticfunctions
…obalstaticvariables-into-new-globalstaticfunctions
…obalstaticvariables-into-new-globalstaticfunctions
…obalstaticvariables-into-new-globalstaticfunctions
…obalstaticvariables-into-new-globalstaticfunctions
…obalstaticvariables-into-new-globalstaticfunctions
# Fix Discord release notifications reporting wrong version (`4.0.0.0`) ## Summary Fixes incorrect Discord embed versions (notably `4.0.0.0`) across nightly, canary, stable, and canary-lts release workflows by replacing fragile XML parsing with evaluated MSBuild version resolution and adding strict version validation guards. Closes [#3341](#3341). ## Root cause The old fallback parsed the project XML using: ```powershell $projXml.SelectSingleNode("//Version") ``` This can resolve the first `<Version>` element in the file, which may be dependency metadata (e.g., `System.Design` reference `4.0.0.0`) instead of the Toolkit package/build version. When assembly-based lookup failed, this fallback produced `4.0.0.0`, which was then posted to Discord. ## What changed 1. **Primary version source:** Use evaluated MSBuild property output: ```powershell dotnet msbuild "<project>" -getProperty:Version -p:Configuration=<Config> -nologo -v:q ``` 2. **Deterministic assembly fallback:** Probe explicit candidate paths in fixed order with `Test-Path` + `Get-Item`: - `artifacts/bin/<Config>/net48/Krypton.Toolkit.dll` - `Bin/<Config>/net48/Krypton.Toolkit.dll` - plus legacy `Artefacts/...` in canary-lts where applicable 3. **Guard rails (new):** Accept versions only if they match expected Krypton-style numeric version format (`major >= 100`). Values like `4.0.0.0` are ignored and do not get published. ## Files updated - `.github/workflows/nightly.yml` - `.github/workflows/canary.yml` - `.github/workflows/release.yml` - `.github/workflows/canary-lts-release.yml` ## Verification - Local spot-check: ```powershell dotnet msbuild "Source/Krypton Components/Krypton.Toolkit/Krypton.Toolkit 2022.csproj" -getProperty:Version -p:Configuration=Nightly -nologo -v:q ``` Expected: Krypton release version format (`110.x.x.x`), not `4.0.0.0`. - Workflow logs should now show warnings if unexpected versions are encountered: - `Ignoring unexpected MSBuild version '...'` - `Ignoring unexpected assembly version '...'` - After merge, next release notification should show the evaluated build version in Discord. ## Notes - Scheduled workflows execute from the branch GitHub uses for the schedule trigger. If this fix branch is not yet merged into that branch, Discord may still show the old value until merge.
Bumps [NuGet/setup-nuget](https://github.com/nuget/setup-nuget) from 3.1.0 to 4. - [Release notes](https://github.com/nuget/setup-nuget/releases) - [Commits](NuGet/setup-nuget@v3.1.0...v4) --- updated-dependencies: - dependency-name: NuGet/setup-nuget dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [NuGet/setup-nuget](https://github.com/nuget/setup-nuget) from 3.1.0 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/nuget/setup-nuget/releases">NuGet/setup-nuget's releases</a>.</em></p> <blockquote> <h2>v4.0</h2> <h2>What's Changed</h2> <ul> <li>Migrate to ESM and update all npm packages to latest versions by <a href="https://github.com/jeffkl"><code>@jeffkl</code></a> in <a href="https://redirect.github.com/NuGet/setup-nuget/pull/234">NuGet/setup-nuget#234</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/NuGet/setup-nuget/compare/v3.0.1...v4.0">https://github.com/NuGet/setup-nuget/compare/v3.0.1...v4.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/NuGet/setup-nuget/commit/fd55a6f3b34392fa83fde1454582407d8c714123"><code>fd55a6f</code></a> Migrate to ESM and update all npm packages to latest versions (<a href="https://redirect.github.com/nuget/setup-nuget/issues/234">#234</a>)</li> <li>See full diff in <a href="https://github.com/nuget/setup-nuget/compare/v3.1.0...v4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
#3326) …cFunctions` * Implemented #1738 <img width="669" height="251" alt="image" src="https://github.com/user-attachments/assets/c2abf878-cf47-4f54-97aa-2f6e6ede9f3a" />
# Fix Discord release notifications reporting wrong version (`4.0.0.0`) ## Summary Fixes incorrect Discord embed versions (notably `4.0.0.0`) across nightly, canary, stable, and canary-lts release workflows by replacing fragile XML parsing with evaluated MSBuild version resolution and adding strict version validation guards. Closes [#3341](#3341). ## Root cause The old fallback parsed the project XML using: ```powershell $projXml.SelectSingleNode("//Version") ``` This can resolve the first `<Version>` element in the file, which may be dependency metadata (e.g., `System.Design` reference `4.0.0.0`) instead of the Toolkit package/build version. When assembly-based lookup failed, this fallback produced `4.0.0.0`, which was then posted to Discord. ## What changed 1. **Primary version source:** Use evaluated MSBuild property output: ```powershell dotnet msbuild "<project>" -getProperty:Version -p:Configuration=<Config> -nologo -v:q ``` 2. **Deterministic assembly fallback:** Probe explicit candidate paths in fixed order with `Test-Path` + `Get-Item`: - `artifacts/bin/<Config>/net48/Krypton.Toolkit.dll` - `Bin/<Config>/net48/Krypton.Toolkit.dll` - plus legacy `Artefacts/...` in canary-lts where applicable 3. **Guard rails (new):** Accept versions only if they match expected Krypton-style numeric version format (`major >= 100`). Values like `4.0.0.0` are ignored and do not get published. ## Files updated - `.github/workflows/nightly.yml` - `.github/workflows/canary.yml` - `.github/workflows/release.yml` - `.github/workflows/canary-lts-release.yml` ## Verification - Local spot-check: ```powershell dotnet msbuild "Source/Krypton Components/Krypton.Toolkit/Krypton.Toolkit 2022.csproj" -getProperty:Version -p:Configuration=Nightly -nologo -v:q ``` Expected: Krypton release version format (`110.x.x.x`), not `4.0.0.0`. - Workflow logs should now show warnings if unexpected versions are encountered: - `Ignoring unexpected MSBuild version '...'` - `Ignoring unexpected assembly version '...'` - After merge, next release notification should show the evaluated build version in Discord. ## Notes - Scheduled workflows execute from the branch GitHub uses for the schedule trigger. If this fix branch is not yet merged into that branch, Discord may still show the old value until merge.
PWagner1
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated PR: alpha has had commits in the last 24 hours. Merge to update alpha-backup.
Triggered by Alpha to Alpha-Backup Sync workflow.