* Use the new artifacts feature to simplify build paths#3319
Open
* Use the new artifacts feature to simplify build paths#3319
Conversation
@ -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
Smurf-IV
approved these changes
Apr 12, 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.
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 underartifacts/packages/<Configuration>/, while keeping legacyBin/behavior as the default for local and script builds. Orchestrated builds (script.projfiles and GitHub Actions) can opt in with/p:UseArtifactsOutput=trueand use shared properties so Clean, Pack, Push, archives, and version discovery stay consistent.Closes / implements GitHub #998.
What changed
MSBuild / repo
Directory.Build.props:UseArtifactsOutput(defaultfalse),KryptonLegacyBinRoot,KryptonLegacyPackageRoot,KryptonArtifactsRoot,KryptonBuildOutputRoot,KryptonPackageOutputRoot.Source/Krypton Components/Directory.Build.props:PackageOutputPathuses$(KryptonPackageOutputRoot)$(Configuration)\.Source/Krypton Components/Directory.Build.targets: WhenUseArtifactsOutput=true, setsOutputPathto$(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 checksartifacts/packages/...andartifacts/bin/...in addition to legacyBin/....Scripts/ModernBuild/README.md: Documents dual-layout behavior (and related lint fixes as applicable).CI
/p:UseArtifactsOutput=trueon relevantmsbuildsteps (e.g.build.yml,release.yml,nightly.yml,canary.yml,codeql.yml,canary-lts-release.ymlwhere applicable)..nupkgandKrypton.Toolkit.dllfromartifacts/...first, withBin/...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, andCurrent/BuildWorkflow.md/Current/ReleaseWorkflow.mdfor artifacts paths,UseArtifactsOutput, and alignment with current workflow jobs.Backward compatibility
UseArtifactsOutput=false: outputs stay underBin/andBin/Packages/unless the property is set.Bin/...) to keep working where fallback is implemented.How to verify
Local (legacy)
msbuildonScripts/Build/build.projwithoutUseArtifactsOutput.Bin/<Configuration>/andBin/Packages/<Configuration>/.Local or CI (artifacts)
/p:UseArtifactsOutput=true.artifacts/bin/<Configuration>/andartifacts/packages/<Configuration>/.ModernBuild
Optional
Source/Krypton Components/TestFormor your usual harness after a full build to smoke-test UI.Notes / follow-ups
UseArtifactsOutputon a narrow subset of TFMs, treat that as a separate tooling/project follow-up; the property is primarily validated through the main orchestrated.projand CI paths documented above.canary-lts-release.yml: If that workflow still references paths spelledArtefacts/, reconcile withartifacts/+Bin/in a follow-up PR if those steps are still active.Checklist
Documents/Changelog/Changelog.md)Documents/Build System/)alpha/canary/masterper team process)