Skip to content

* Use the new artifacts feature to simplify build paths#3319

Open
PWagner1 wants to merge 4 commits intoalphafrom
V110-998-feature-request-use-the-new-artifacts-feature-to-simplify-build-paths
Open

* Use the new artifacts feature to simplify build paths#3319
PWagner1 wants to merge 4 commits intoalphafrom
V110-998-feature-request-use-the-new-artifacts-feature-to-simplify-build-paths

Conversation

@PWagner1
Copy link
Copy Markdown
Contributor

Use artifacts-style build outputs (#998)

Summary

This change adds optional MSBuild output layout aligned with the .NET SDK “artifacts” style: binaries under artifacts/bin/<Configuration>/ and NuGet packages under artifacts/packages/<Configuration>/, while keeping legacy Bin/ behavior as the default for local and script builds. Orchestrated builds (script .proj files and GitHub Actions) can opt in with /p:UseArtifactsOutput=true and use shared properties so Clean, Pack, Push, archives, and version discovery stay consistent.

Closes / implements GitHub #998.

What changed

MSBuild / repo

  • Root Directory.Build.props: UseArtifactsOutput (default false), KryptonLegacyBinRoot, KryptonLegacyPackageRoot, KryptonArtifactsRoot, KryptonBuildOutputRoot, KryptonPackageOutputRoot.
  • Source/Krypton Components/Directory.Build.props: PackageOutputPath uses $(KryptonPackageOutputRoot)$(Configuration)\.
  • Source/Krypton Components/Directory.Build.targets: When UseArtifactsOutput=true, sets OutputPath to $(KryptonBuildOutputRoot)$(Configuration)\ so component outputs match the script layout.

Scripts

  • Scripts/VS2022/*.proj, Scripts/Current/*.proj, Scripts/Build/*.proj: Paths for clean, push, and archive targets use $(KryptonBuildOutputRoot) / $(KryptonPackageOutputRoot) instead of hardcoded ..\Bin\....

ModernBuild

  • Scripts/ModernBuild/General/BuildLogic.cs: Package folder and related discovery checks artifacts/packages/... and artifacts/bin/... in addition to legacy Bin/....
  • Scripts/ModernBuild/README.md: Documents dual-layout behavior (and related lint fixes as applicable).

CI

  • Workflows pass /p:UseArtifactsOutput=true on relevant msbuild steps (e.g. build.yml, release.yml, nightly.yml, canary.yml, codeql.yml, canary-lts-release.yml where applicable).
  • Push and version steps resolve .nupkg and Krypton.Toolkit.dll from artifacts/... first, with Bin/... fallback for backward compatibility.

Documentation

  • Documents/Changelog/Changelog.md: Entry for [Feature Request]: Use the new artifacts feature to simplify build paths #998 (under the current nightly section).
  • Documents/Build System/: Updated overview, DirectoryBuildConfiguration, MSBuildProjectFiles, ModernBuildTool, BuildScripts, NuGetPackaging, VersionManagement, Troubleshooting, KillSwitches, and Current/BuildWorkflow.md / Current/ReleaseWorkflow.md for artifacts paths, UseArtifactsOutput, and alignment with current workflow jobs.

Backward compatibility

  • Default remains UseArtifactsOutput=false: outputs stay under Bin/ and Bin/Packages/ unless the property is set.
  • CI and dual-path resolution allow older expectations (Bin/...) to keep working where fallback is implemented.

How to verify

  • Local (legacy)

    • Run existing script or msbuild on Scripts/Build/build.proj without UseArtifactsOutput.
    • Confirm assemblies and packages under Bin/<Configuration>/ and Bin/Packages/<Configuration>/.
  • Local or CI (artifacts)

    • Build with /p:UseArtifactsOutput=true.
    • Confirm artifacts/bin/<Configuration>/ and artifacts/packages/<Configuration>/.
  • ModernBuild

    • Pack/push/ZIP flows find packages when outputs live under either layout.
  • Optional

    • Open Source/Krypton Components/TestForm or your usual harness after a full build to smoke-test UI.

Notes / follow-ups

  • If any project hits resource or SDK warnings when forcing UseArtifactsOutput on a narrow subset of TFMs, treat that as a separate tooling/project follow-up; the property is primarily validated through the main orchestrated .proj and CI paths documented above.
  • canary-lts-release.yml: If that workflow still references paths spelled Artefacts/, reconcile with artifacts/ + Bin/ in a follow-up PR if those steps are still active.

Checklist

  • Changelog updated (Documents/Changelog/Changelog.md)
  • Build System docs updated (Documents/Build System/)
  • PR targets the correct base branch (e.g. alpha / canary / master per team process)
  • CI green on this branch

PWagner1 and others added 3 commits April 12, 2026 07:21
@ -0,0 +1,67 @@
# Use artifacts-style build outputs (#998)

## Summary

This change adds optional MSBuild output layout aligned with the .NET SDK “artifacts” style: binaries under `artifacts/bin/<Configuration>/` and NuGet packages under `artifacts/packages/<Configuration>/`, while keeping **legacy `Bin/` behavior as the default** for local and script builds. Orchestrated builds (script `.proj` files and GitHub Actions) can opt in with `/p:UseArtifactsOutput=true` and use shared properties so Clean, Pack, Push, archives, and version discovery stay consistent.

Closes / implements [GitHub #998](#998).

## What changed

### MSBuild / repo

- **Root `Directory.Build.props`**: `UseArtifactsOutput` (default `false`), `KryptonLegacyBinRoot`, `KryptonLegacyPackageRoot`, `KryptonArtifactsRoot`, `KryptonBuildOutputRoot`, `KryptonPackageOutputRoot`.
- **`Source/Krypton Components/Directory.Build.props`**: `PackageOutputPath` uses `$(KryptonPackageOutputRoot)$(Configuration)\`.
- **`Source/Krypton Components/Directory.Build.targets`**: When `UseArtifactsOutput=true`, sets `OutputPath` to `$(KryptonBuildOutputRoot)$(Configuration)\` so component outputs match the script layout.

### Scripts

- **`Scripts/VS2022/*.proj`**, **`Scripts/Current/*.proj`**, **`Scripts/Build/*.proj`**: Paths for clean, push, and archive targets use `$(KryptonBuildOutputRoot)` / `$(KryptonPackageOutputRoot)` instead of hardcoded `..\Bin\...`.

### ModernBuild

- **`Scripts/ModernBuild/General/BuildLogic.cs`**: Package folder and related discovery checks `artifacts/packages/...` and `artifacts/bin/...` in addition to legacy `Bin/...`.
- **`Scripts/ModernBuild/README.md`**: Documents dual-layout behavior (and related lint fixes as applicable).

### CI

- Workflows pass **`/p:UseArtifactsOutput=true`** on relevant `msbuild` steps (e.g. `build.yml`, `release.yml`, `nightly.yml`, `canary.yml`, `codeql.yml`, `canary-lts-release.yml` where applicable).
- Push and version steps resolve **`.nupkg` and `Krypton.Toolkit.dll` from `artifacts/...` first**, with **`Bin/...` fallback** for backward compatibility.

### Documentation

- **`Documents/Changelog/Changelog.md`**: Entry for #998 (under the current nightly section).
- **`Documents/Build System/`**: Updated overview, `DirectoryBuildConfiguration`, `MSBuildProjectFiles`, `ModernBuildTool`, `BuildScripts`, `NuGetPackaging`, `VersionManagement`, `Troubleshooting`, `KillSwitches`, and **`Current/BuildWorkflow.md`** / **`Current/ReleaseWorkflow.md`** for artifacts paths, `UseArtifactsOutput`, and alignment with current workflow jobs.

## Backward compatibility

- Default remains **`UseArtifactsOutput=false`**: outputs stay under **`Bin/`** and **`Bin/Packages/`** unless the property is set.
- CI and dual-path resolution allow older expectations (`Bin/...`) to keep working where fallback is implemented.

## How to verify

- **Local (legacy)**
  - Run existing script or `msbuild` on `Scripts/Build/build.proj` without `UseArtifactsOutput`.
  - Confirm assemblies and packages under `Bin/<Configuration>/` and `Bin/Packages/<Configuration>/`.

- **Local or CI (artifacts)**
  - Build with `/p:UseArtifactsOutput=true`.
  - Confirm `artifacts/bin/<Configuration>/` and `artifacts/packages/<Configuration>/`.

- **ModernBuild**
  - Pack/push/ZIP flows find packages when outputs live under either layout.

- **Optional**
  - Open **`Source/Krypton Components/TestForm`** or your usual harness after a full build to smoke-test UI.

## Notes / follow-ups

- If any project hits resource or SDK warnings when forcing `UseArtifactsOutput` on a narrow subset of TFMs, treat that as a separate tooling/project follow-up; the property is primarily validated through the main orchestrated `.proj` and CI paths documented above.
- **`canary-lts-release.yml`**: If that workflow still references paths spelled `Artefacts/`, reconcile with `artifacts/` + `Bin/` in a follow-up PR if those steps are still active.

## Checklist

- [x] Changelog updated (`Documents/Changelog/Changelog.md`)
- [x] Build System docs updated (`Documents/Build System/`)
- [ ] PR targets the correct base branch (e.g. `alpha` / `canary` / `master` per team process)
- [ ] CI green on this branch
…to-simplify-build-paths' of https://github.com/Krypton-Suite/Standard-Toolkit into V110-998-feature-request-use-the-new-artifacts-feature-to-simplify-build-paths
@PWagner1 PWagner1 added this to the Version 110 milestone Apr 12, 2026
@PWagner1 PWagner1 added area:buildsystem All issues related to the build system. version:110 All things to do with V110. labels Apr 12, 2026
@PWagner1 PWagner1 requested a review from a team as a code owner April 12, 2026 07:00
@github-actions github-actions bot added the chore:automatic-backup Pull requests relating to the automatic backup workflow. label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:buildsystem All issues related to the build system. chore:automatic-backup Pull requests relating to the automatic backup workflow. version:110 All things to do with V110.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants