-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: refactor old build system into a proper Sdk #3085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kryptos-FR
wants to merge
73
commits into
stride3d:master
Choose a base branch
from
Kryptos-FR:feature/stride-sdk
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 70 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
e6c19d5
Start researching making our own Stride.Sdk
Kryptos-FR 3e56756
Complete research with SDK composition
Kryptos-FR ad13aef
Complete Phase 1: Comprehensive build system inventory
Kryptos-FR faafca3
Add skeletons for Stride SDKs
Kryptos-FR 1b58837
WIP notes and extended props/targets for Core
Kryptos-FR 5c98d49
WIP
Kryptos-FR 7c3437c
WIP additional docs
Kryptos-FR 62789e7
WIP also move target frameworks to targets file
Kryptos-FR 07b5181
Add Claude Code configuration and skill commands
Kryptos-FR a83b287
Add SDK work guide and enhance build system documentation
Kryptos-FR 10a2880
Add YAML front matter to all skill commands for lazy loading
Kryptos-FR 2d5e85f
Add session summary and summarize-session skill command
Kryptos-FR 0a55166
Document SDK property evaluation order and identify old system bug
Kryptos-FR effbc8b
Complete Stride.Core SDK migration (desktop platforms)
Kryptos-FR f15fa68
Update session summary with SDK migration completion
Kryptos-FR d9659d1
Update session summary with compaction (Assembly Processor implementa…
Kryptos-FR 1b331e9
Implement full Assembly Processor integration in Stride.SDK
Kryptos-FR 6143456
Update session summary with Assembly Processor completion
Kryptos-FR f65e6e7
Generate SDK packages on build and clean from cache
Kryptos-FR 2502086
Migrate Stride.Core.IO, MicroThreading, and Serialization to SDK
Kryptos-FR eca5f8b
Implement Stride.Sdk.Tests and migrate Stride.Core.Tests
Kryptos-FR 0accee1
Update session summary with compaction (SDK test infrastructure)
Kryptos-FR 6339fa4
Remove specific user path in docs
Kryptos-FR f010b27
Migrate remaining core projects to SDK and fix test launcher
Kryptos-FR 1c937ff
Migrate Stride.Core.CompilerServices to SDK
Kryptos-FR 56734bb
Add Graphics API support to SDK and migrate 11 engine projects
Kryptos-FR 3a32d05
Migrate 49 projects to SDK: engine, shaders, buildengine, assets, too…
Kryptos-FR 09fcd68
Create Stride.Sdk.Editor and separate editor framework properties fro…
Kryptos-FR c4cb250
Remove unused Stride.Sdk.Runtime package
Kryptos-FR dcfc131
Update SDK modernization roadmap to reflect current progress
Kryptos-FR b64df33
Migrate editor and test projects to SDK, add AllowUnsafeBlocks to SDK
Kryptos-FR e4b4d64
Update session summary with compaction (Stride.Sdk.Editor + Phase 6)
Kryptos-FR ac57faf
Merge upstream/master into feature/stride-sdk
Kryptos-FR 6a40dd7
Fix StrideRuntime multi-targeting: restore StrideExplicitWindowsRunti…
Kryptos-FR 4e9b841
Fix post-merge build errors: launchers, missing properties, SDK migra…
Kryptos-FR 38cb984
Fix MSB3052 warning: newlines and empty defines in DefineConstants
Kryptos-FR a61e0e2
Add StrideCompileAssets support to Stride.Sdk.Tests
Kryptos-FR 208ea9f
Fix OutputPath: set Configuration default before output path computation
Kryptos-FR 1c41684
Disable TFM output path appending to match old build system behavior
Kryptos-FR 4213f6d
Fix BuildOutputInPackage: use $(TargetDir) instead of $(OutputPath)
Kryptos-FR 226d3a4
Remove build/ convention files from SDK packages to fix double-import
Kryptos-FR 28fa705
Update CLAUDE.md
Kryptos-FR 51eb27c
Update session summary with compaction
Kryptos-FR 4b61f18
Complete Phase 6: migrate BepuPhysics and CrashReport to SDK, update …
Kryptos-FR 2e60466
Phase 7.3/7.4: SDK polish and documentation update
Kryptos-FR c414bdd
Phase 7.2: Migrate 14 mobile test projects from Xamarin to SDK-style
Kryptos-FR 6bee359
Add comprehensive SDK gap analysis and Phase 8 roadmap
Kryptos-FR 1d90ae1
Phase 8.1: Fix high-priority SDK gaps for mobile and graphics parity
Kryptos-FR f47b59d
Fix minor SDK gaps: StridePublicApi, StrideScript, SourceLink
Kryptos-FR e8763c9
Phase 8.3: Port remaining low-priority gaps to SDK
Kryptos-FR 92404e4
Port .ssdeps native dependency system to SDK (Gap #3)
Kryptos-FR 286b6ef
Port Graphics API inner build dispatching to SDK (Gap #1)
Kryptos-FR eb1e243
Add .slnf solution filters for Android and iOS builds
Kryptos-FR 984ea11
Replace mobile/runtime .sln files with .slnf solution filters
Kryptos-FR 85f8ea0
Delete sources/targets/ legacy build system (Phase 7.1)
Kryptos-FR a8811e4
Fix SourceLink error when ManagePackageVersionsCentrally=false
Kryptos-FR 97ff75c
Fix test output path resolution from NuGet package cache
Kryptos-FR 96057f3
Fix assembly processor not running and broken NuGet cache paths
Kryptos-FR 4caac39
Restore auto-pack and fix packaging of deleted sources/targets/ files
Kryptos-FR 2534466
Update Stride.build to use .slnf solution filters
Kryptos-FR cd02228
Add SDK build step to all CI workflows
Kryptos-FR 975ff5b
Remove shared projects from Stride.Runtime.slnf
Kryptos-FR 89b613a
Add BuildSdk prerequisite target to Stride.build
Kryptos-FR d174fe4
Delete obsolete build/*.props and .targets files
Kryptos-FR f77a40b
Disable ValidateExecutableReferences for .NET 10 SDK compatibility
Kryptos-FR 9d99576
Fix iOS/Android builds: platform defines were not applied to DefineCo…
Kryptos-FR e5f9b77
Cleanup documentation
Kryptos-FR b946d3f
Enable assembly processor by default for test projects
Kryptos-FR cbac7d9
Remove CLAUDE.md and .claude/ from version control
Kryptos-FR 2a2909f
Remove docs/ from version control
Kryptos-FR 57b118b
Remove backup files
Kryptos-FR 50c6436
Remove SUMMARY.md from version control
Kryptos-FR 4a92770
Rename Stride.Sdk to Stride.Build.Sdk to reserve Stride.Sdk for futur…
Kryptos-FR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| name: Build Stride SDK | ||
| description: Build and install Stride.Sdk MSBuild SDK packages into the local NuGet cache | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Build Stride SDK | ||
| shell: pwsh | ||
| run: | | ||
| dotnet build sources/sdk/Stride.Sdk.slnx -v:m |
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,182 @@ | ||
| # Session Summary - Stride SDK Migration | ||
|
|
||
| **Date:** 2026-03-06 | ||
| **Branch:** feature/stride-sdk | ||
| **Status:** Up to date with origin (0 commits ahead), working tree clean | ||
|
|
||
| --- | ||
|
|
||
| ## Latest Session (Double-Import Fix & OutputPath Investigation) | ||
|
|
||
| ### What Was Accomplished | ||
|
|
||
| Investigated and fixed a critical bug where `dotnet build` without `-c Debug` produced wrong output paths (`bin\net10.0\` instead of `bin\Debug\net10.0\`) for SDK-migrated projects. The root cause was NuGet `build/` convention files in the SDK packages causing double-import of Microsoft.NET.Sdk. | ||
|
|
||
| **Commit `226d3a47d`: Remove build/ convention files from SDK packages to fix double-import** | ||
| - Deleted `build/Stride.Sdk.props` and `build/Stride.Sdk.targets` from all 3 SDK packages | ||
| - Removed `build/` packing from all 3 `.csproj` files | ||
| - 10 files changed, 1 insertion, 71 deletions | ||
|
|
||
| **Commit `28fa705a0`: Update CLAUDE.md** | ||
| - Added SDK build commands section to CLAUDE.md | ||
|
|
||
| ### Files Modified | ||
| - `sources/sdk/Stride.Sdk/build/Stride.Sdk.props` - DELETED | ||
| - `sources/sdk/Stride.Sdk/build/Stride.Sdk.targets` - DELETED | ||
| - `sources/sdk/Stride.Sdk/Stride.Sdk.csproj` - Removed build/ packing lines | ||
| - `sources/sdk/Stride.Sdk.Editor/build/*` - DELETED (2 files) | ||
| - `sources/sdk/Stride.Sdk.Editor/Stride.Sdk.Editor.csproj` - Removed build/ packing lines | ||
| - `sources/sdk/Stride.Sdk.Tests/build/*` - DELETED (2 files) | ||
| - `sources/sdk/Stride.Sdk.Tests/Stride.Sdk.Tests.csproj` - Removed build/ packing lines | ||
|
|
||
| ### Critical Discoveries | ||
|
|
||
| **NuGet build/ convention file double-import:** | ||
| When a package is referenced via `Sdk="PackageName"` on the `<Project>` element, NuGet ALSO auto-imports any `build/PackageName.props` and `build/PackageName.targets` from the package. Our `build/` files re-imported `Sdk/Sdk.targets`, causing Microsoft.NET.Sdk to be evaluated twice during `-restore` with 2+ ProjectReferences. This corrupted the `Configuration` property, producing `bin\net10.0\` (empty Configuration) instead of `bin\Debug\net10.0\`. | ||
|
|
||
| **Rule:** Stride.Sdk packages must ONLY use `Sdk/` folder for MSBuild SDK resolution, NEVER `build/` convention files. The SDK is always referenced as `Sdk="Stride.Sdk"`, never as `<PackageReference>`. | ||
|
|
||
| **OutputPath changes were unnecessary:** | ||
| After the double-import fix, tested whether additional `AppendTargetFrameworkToOutputPath=false` changes in `Stride.Platform.props` were needed. They were NOT - output paths are correct without them. The old build system also does NOT disable TFM appending. | ||
|
|
||
| ### Verification Results | ||
| - Created old-style and SDK-style test projects for direct comparison | ||
| - Both produce identical output: `bin\Debug\net10.0\` | ||
| - Verified with 1, 2, and 3 ProjectReferences (the alternating pattern is gone) | ||
| - Stashed and dropped the unnecessary OutputPath changes | ||
|
|
||
| ### Key Learnings | ||
| - NuGet convention files (`build/`) are imported for ANY package type, even SDK packages | ||
| - The `-restore` flag causes MSBuild to run restore then build in two phases with different evaluation contexts | ||
| - Old build system uses explicit `<Import>` (not `Sdk="..."` attribute), which avoids the NuGet convention file issue entirely | ||
| - Diagnostic method: stripped SDK to bare wrapper to prove issue was in package structure, not in Stride imports | ||
|
|
||
| --- | ||
|
|
||
| ## Previous Session - Stride.Sdk.Editor + Phase 6 Completion | ||
|
|
||
| Created `Stride.Sdk.Editor` MSBuild SDK package, removed `Stride.Sdk.Runtime`, migrated all editor and test projects to SDK, completed Phase 6. SDK hierarchy finalized: Stride.Sdk -> Stride.Sdk.Editor -> Stride.Sdk.Tests. | ||
|
|
||
| **Commits:** `09fcd681f`, `c4cb2505a`, `dcfc13101`, `b64df33eb` | ||
| **Key changes:** | ||
| - Created Stride.Sdk.Editor (6 files) with editor framework properties | ||
| - Removed unused Stride.Sdk.Runtime package | ||
| - Migrated 38 editor/presentation projects to Stride.Sdk.Editor, 25 test projects to Stride.Sdk.Tests | ||
| - Added `AllowUnsafeBlocks=true` after Microsoft.NET.Sdk import (it resets the value) | ||
| - ~95 of ~113 projects migrated total | ||
|
|
||
| --- | ||
|
|
||
| ## Project Status | ||
|
|
||
| **Migration Progress:** ~95 of ~113 projects migrated to SDK | ||
| - Core: 12/12 + tests | ||
| - Engine: 11/~26 runtime + tests | ||
| - Shaders, BuildEngine, Assets, Tools, Presentation, Editor: all migrated | ||
|
|
||
| **What's Working:** | ||
| - SDK packages build (Stride.Sdk, Stride.Sdk.Editor, Stride.Sdk.Tests) | ||
| - Multi-targeting (net10.0, net10.0-windows) | ||
| - Assembly Processor, Graphics API defines, Code Analysis | ||
| - Output paths match old build system: `bin\Debug\net10.0\` | ||
|
|
||
| **Remaining Unmigrated (~18):** | ||
| - StrideGraphicsApiDependent projects (3): Stride.Graphics, Stride.Input, Stride.Games | ||
| - Stride.Video (GraphicsApiDependent) | ||
| - Stride.Native (C++/CLI) | ||
| - BepuPhysics engine projects (4) | ||
| - Other: Stride.VirtualReality, Stride.Games.Testing, Stride.Graphics.Regression | ||
|
|
||
| **Git Status:** Clean (all changes committed, up to date with origin) | ||
|
|
||
| --- | ||
|
|
||
| ## Critical Information | ||
|
|
||
| ### Build Commands | ||
| ```bash | ||
| # Build SDK | ||
| dotnet build sources/sdk/Stride.Sdk.slnx | ||
|
|
||
| # Clear NuGet cache after SDK changes | ||
| rm -rf "$USERPROFILE/.nuget/packages/stride.sdk" | ||
| rm -rf "$USERPROFILE/.nuget/packages/stride.sdk.editor" | ||
| rm -rf "$USERPROFILE/.nuget/packages/stride.sdk.tests" | ||
|
|
||
| # Reinstall SDK to NuGet cache | ||
| for pkg in stride.sdk stride.sdk.editor stride.sdk.tests; do | ||
| unzip -o "build/packages/..." -d "$USERPROFILE/.nuget/packages/$pkg/4.3.0-dev/" | ||
| done | ||
|
|
||
| # MSBuild for C++/CLI projects | ||
| "C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\MSBuild.exe" ... | ||
|
|
||
| # Kill MSBuild/dotnet processes after SDK changes | ||
| taskkill //F //IM dotnet.exe | ||
| ``` | ||
|
|
||
| ### MSBuild SDK Evaluation Order | ||
| ``` | ||
| Sdk.props (before .csproj) -> .csproj (user properties) -> Sdk.targets (after .csproj) | ||
| ``` | ||
| **Rule:** Defaults in props, conditional logic in targets. | ||
|
|
||
| ### Key Properties | ||
| - `StrideRuntime=true` - auto-generates TargetFrameworks | ||
| - `StrideGraphicsApiDependent=true` - custom inner build for multiple graphics APIs | ||
| - `StrideAssemblyProcessor=true` - enables assembly processing | ||
| - `StridePackAssets=true` - pack shader/asset files (target not yet in SDK) | ||
|
|
||
| ### SDK File Structure | ||
| ``` | ||
| sources/sdk/ | ||
| Stride.Sdk/Sdk/ - Sdk.props, Sdk.targets, Stride.Frameworks.*, Stride.Platform.*, Stride.Graphics.*, Stride.AssemblyProcessor.targets, Stride.CodeAnalysis.targets, Stride.PackageInfo.targets | ||
| Stride.Sdk.Editor/Sdk/ - Sdk.props, Sdk.targets, Stride.Editor.Frameworks.props | ||
| Stride.Sdk.Tests/Sdk/ - Sdk.props, Sdk.targets, LauncherSimple.Desktop.cs, LauncherGame.Desktop.cs | ||
| ``` | ||
|
|
||
| ### SDK Package Rule | ||
| SDK packages must ONLY use `Sdk/` folder. NEVER add `build/` convention files - they cause double-import when combined with `Sdk="PackageName"`. | ||
|
|
||
| --- | ||
|
|
||
| ## Next Steps | ||
|
|
||
| ### High Priority (Next 1-2 Sessions) | ||
| 1. **Implement StrideGraphicsApiDependent in SDK** - custom inner build for Stride.Graphics, Input, Games, Video | ||
| 2. **Migrate BepuPhysics engine projects** (4 projects) | ||
| 3. **Add StridePackAssets target to SDK** - needed for NuGet packaging | ||
|
|
||
| ### Medium Priority (3-5 Sessions) | ||
| 1. **Migrate remaining engine projects** - Stride.Native (C++/CLI), VirtualReality, Games.Testing, Graphics.Regression | ||
| 2. **Full solution build verification** with MSBuild | ||
| 3. **Run test suites** to verify migration correctness | ||
|
|
||
| ### Long-Term | ||
| 1. Complete all ~113 project migrations | ||
| 2. Remove old build system (`sources/targets/`) | ||
| 3. Add mobile/UWP platform support | ||
| 4. Update project templates | ||
|
|
||
| --- | ||
|
|
||
| ## Commands for Next Session | ||
|
|
||
| ```bash | ||
| # Check status | ||
| git status | ||
| git log --oneline -10 | ||
|
|
||
| # Build SDK | ||
| dotnet build sources/sdk/Stride.Sdk.slnx | ||
|
|
||
| # Test migrated project | ||
| dotnet build sources/presentation/Stride.Core.Quantum/Stride.Core.Quantum.csproj | ||
|
|
||
| # Analyze project for migration | ||
| /analyze-csproj-migration sources/engine/Stride.Graphics/Stride.Graphics.csproj | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| **For resuming work:** Double-import bug is fixed and committed. Output paths now match the old build system. Next focus is implementing StrideGraphicsApiDependent inner build system in the SDK (Phase 7), which is the main remaining blocker for completing engine project migrations. | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.