Skip to content

Build fixes + StrideDevPackages fast dev mode#3196

Merged
xen2 merged 5 commits into
masterfrom
build-fixes-and-fast-devmode
May 29, 2026
Merged

Build fixes + StrideDevPackages fast dev mode#3196
xen2 merged 5 commits into
masterfrom
build-fixes-and-fast-devmode

Conversation

@xen2
Copy link
Copy Markdown
Member

@xen2 xen2 commented May 29, 2026

PR Details

Fast devmode (bypass nuget packaging)

Adds StrideDevPackages mode: stub .nupkg files redirect to dev-built DLLs, eliminating 30+ seconds of GenerateNuspec/PackTask overhead on incremental GameStudio builds.

Toggle via dotnet run build/GenerateDevPackages.cs (writes StrideDevPackages=true to build/Stride.Local.props), --disable to revert.

As a result, it's now possible to recompile a single Stride lib and an external game using PackageReference will pick the changes on next incremental build (no clean/restore needed).

Misc build fixes:

  • List CompilerApp in test slnfs so solution traversal packs it
  • Preserve in-package .props/.targets when generating dev stubs (merge instead of overwrite)
  • Unify path lookups on $(StrideRoot)
  • Match dev-redirect items by NuGetPackageId and Filename so packages bundling sibling DLLs (e.g. Stride.Physics ships BulletSharp.NetStandard.dll via BuildOutputInPackage) keep those siblings in deps.json
  • Set ExternallyResolved=true on the redirect items so they pass the StrideAddReference filter in Stride.Core.targets (otherwise AssemblyProcessor skips module/serializer registrations for Stride.UI/Stride.Particles/etc.)
  • Worktree version: append suffix to dep versions and template PackageVersion.

Related Issue

#3195 (comment)

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

xen2 added 2 commits May 29, 2026 14:54
When StrideDevPackages=true (set in repo-root Directory.Build.props),
NuGet auto-packing is skipped entirely. Instead, stub .nupkg files
redirect to dev-built DLLs via <Reference HintPath> in .props files.

- Add build/GenerateDevPackages.cs: cross-platform C# script (dotnet run)
  that packs fresh nupkgs, strips managed DLLs, injects redirect props,
  and deploys stubs to NugetDev with _._ TFM markers. Reads
  SharedAssemblyInfo.Worktree.cs when present so the stamp/glob match
  the worktree-suffixed PackageVersion.
- Add Stride.DevPackages.targets: sets StrideSkipAutoPack, warns if
  stubs missing, cleans up stubs when mode is switched off
- Fix NuGetAssemblyResolver and AssemblyContainer to resolve assemblies
  from dev-redirect stubs at runtime (TryResolveDevRedirect). Probes
  $(StrideGraphicsApi) in a platform-aware order so dev DLLs resolve on
  Linux/macOS too, not just Direct3D11 on Windows.

Eliminates ~31s of GenerateNuspec/PackTask/_StrideTriggerPackOnInnerBuild
overhead on incremental GameStudio builds.
@xen2 xen2 force-pushed the build-fixes-and-fast-devmode branch from 11b53bc to fdef102 Compare May 29, 2026 06:29
@xen2 xen2 force-pushed the build-fixes-and-fast-devmode branch from fdef102 to 4d34abf Compare May 29, 2026 07:12
xen2 added 2 commits May 29, 2026 16:36
…f mode

77bda82 (skip Pack trigger when BuildingSolutionFile=true) breaks the
test-asset-compilation path: in slnf mode the test csproj's
_StrideTriggerPackOnInnerBuild no longer dispatches Pack on its engine
ProjectReferences before StrideCompileAsset, so the engine .nupkgs only
land in NugetDev as the natural AfterTargets=Build chain — racing with
CompilerApp.exe.

Strip BuildingSolutionFile when _StrideEnsureCompilerAppPacked dispatches
CompilerApp.Pack so CompilerApp's own _StrideTriggerPackOnInnerBuild
fires and fans Pack out to its engine refs (Stride.UI / Stride.Physics /
etc.) synchronously, before StrideCompileAsset runs.
…licate

MSBuild's DispatchToInnerBuilds target re-dispatches a cross-targeting
project to itself with TargetFramework set per inner. Sequential by
construction — only one inner runs at a time — so the shared OutputPath
(when AppendTargetFrameworkToOutputPath=false, e.g. Stride test SDK)
isn't actually a race.

Skip when parent==self, TargetFramework is set, and target is Build.
@xen2 xen2 merged commit 8129440 into master May 29, 2026
37 of 38 checks passed
@xen2 xen2 deleted the build-fixes-and-fast-devmode branch May 29, 2026 08:38
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