Skip to content

chore: sync alpha → alpha-backup (automated) - #3363

Merged
PWagner1 merged 15 commits into
alpha-backupfrom
alpha
Apr 27, 2026
Merged

chore: sync alpha → alpha-backup (automated)#3363
PWagner1 merged 15 commits into
alpha-backupfrom
alpha

Conversation

@github-actions

Copy link
Copy Markdown

Automated PR: alpha has had commits in the last 24 hours. Merge to update alpha-backup.

Triggered by Alpha to Alpha-Backup Sync workflow.

PWagner1 and others added 15 commits April 16, 2026 12:47
…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 />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=NuGet/setup-nuget&package-manager=github_actions&previous-version=3.1.0&new-version=4)](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>
# 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.
@github-actions
github-actions Bot requested a review from a team as a code owner April 27, 2026 01:23
@PWagner1
PWagner1 merged commit 8f8b725 into alpha-backup Apr 27, 2026
10 of 12 checks passed
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