CultLib/docs/nuget-packaging.md
Meta Vens 9b4167d9ab pack-nuget: pack the ProjectReference closure, not a hand list
Merge 69bd45ff made GameCult.Caching.MessagePack reference CultMath
(PackageId GameCult.Math), so its nuspec depends on GameCult.Math 0.2.4.
The packer's hand-written project list never packed it, and GameCult.Math
is not on nuget.org, so every clean consumer of the local feed failed
restore with NU1101. That is the Eve surface consumer smoke in the
"one-command multiplayer onboarding" jobs, red on both OSes since then.

The packer now walks ProjectReference from the public roots (GameCult.Mesh,
GameCult.Networking.WebSockets) and packs the whole closure. The expected
package names come from MSBuild's PackageId and Version for each project,
since GameCult.Math carries its own identity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:02:08 +02:00

1.2 KiB

NuGet Packaging

See docs/semver-policy.md for what a version bump on these packages is required to mean and how a release is checked against that before it ships.

CultLib publishes the managed dependency graph as separate packages. The leaf package is GameCult.Mesh; its NuGet dependencies preserve the CultMesh, CultNet, and CultCache ownership boundaries.

powershell -ExecutionPolicy Bypass -File .\scripts\pack-nuget.ps1

The command packs GameCult.Mesh, GameCult.Networking.WebSockets, and every project they reach through ProjectReference (including GameCult.Math, which carries its own version) into a local feed under artifacts/nuget. It verifies that each of those packages exists at the identity MSBuild reports for it, then restores and runs a clean .NET consumer using only PackageReference Include="GameCult.Mesh".

The Unity distribution remains org.gamecult.cultlib, built by scripts/build-unity-package.ps1, because Unity consumes the managed assembly closure through UPM rather than NuGet restore.

Install the Unity package from the immutable release tag:

https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.57