Build fixes + StrideDevPackages fast dev mode#3196
Merged
Conversation
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.
11b53bc to
fdef102
Compare
…ookups on $(StrideRoot)
fdef102 to
4d34abf
Compare
…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.
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.
PR Details
Fast devmode (bypass nuget packaging)
Adds
StrideDevPackagesmode: stub.nupkgfiles redirect to dev-built DLLs, eliminating 30+ seconds ofGenerateNuspec/PackTaskoverhead on incremental GameStudio builds.Toggle via
dotnet run build/GenerateDevPackages.cs(writesStrideDevPackages=truetobuild/Stride.Local.props),--disableto revert.As a result, it's now possible to recompile a single Stride lib and an external game using
PackageReferencewill pick the changes on next incremental build (no clean/restore needed).Misc build fixes:
CompilerAppin test slnfs so solution traversal packs it.props/.targetswhen generating dev stubs (merge instead of overwrite)$(StrideRoot)NuGetPackageIdandFilenameso packages bundling sibling DLLs (e.g.Stride.PhysicsshipsBulletSharp.NetStandard.dllviaBuildOutputInPackage) keep those siblings indeps.jsonExternallyResolved=trueon the redirect items so they pass theStrideAddReferencefilter inStride.Core.targets(otherwise AssemblyProcessor skips module/serializer registrations forStride.UI/Stride.Particles/etc.)PackageVersion.Related Issue
#3195 (comment)
Types of changes
Checklist