Skip to content

Commit 1fd3394

Browse files
rekhoffbfopsjdetter
authored
Add cargo ci dlls command for building C# DLLs and NuGet packages (#4033)
# Description of Changes * Added a new `cargo ci dlls` subcommand to build/pack the in-repo C# NuGet packages and the C# SDK. * `cargo ci dlls` restores `sdks/csharp/SpacetimeDB.ClientSDK.csproj` using the freshly built local package outputs as to populate `sdks/csharp/packages/**`. * Added a Unity `.meta` skeleton under `sdks/csharp/unity-meta-skeleton~/**` and overlays those `.meta` files onto the latest restored versioned package directory to keep Unity GUIDs stable and import settings consistent. * Unity-specific import fixes are captured in the skeleton overlay (notably: preventing Unity from importing incompatible TFMs like `net8.0`, and marking analyzer DLLs with the `RoslynAnalyzer` label so Unity can recognize them). # How to use (local) ```bash # Build/pack + restore local packages into sdks/csharp/packages/** cargo ci dlls ``` # API and ABI breaking changes N/A # Expected complexity level and risk 2 - Local developer tooling + file overlay into restore output; no runtime/SDK API behavior changes. # Testing - [x] `cargo check -p ci` - [x] Ran `cargo ci dlls` and verified the output under `sdks/csharp/packages/**` and the various NuGet package locations. - [x] Tested a Unity project importing the SpacetimeDB SDK after generating output and confirmed no errors. --------- Signed-off-by: Ryan <r.ekhoff@clockworklabs.io> Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
1 parent e0b7e32 commit 1fd3394

21 files changed

Lines changed: 445 additions & 0 deletions

File tree

sdks/csharp/.meta-check-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
unity-meta-skeleton~
2+
unity-meta-skeleton~/**

sdks/csharp/packages/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# Ignore most of NuGet package structure, except DLLs which are required by Unity.
2+
/*/*
3+
!/*/*/
24
/*/*/*
35

46
!/*/*/analyzers
57
!/*/*/analyzers.meta
8+
!/*/*/analyzers/**
69

710
!/*/*/lib
811
!/*/*/lib.meta
12+
!/*/*/lib/**
913

1014
# Ignore XML documentation metadata from packages too.
1115
*.xml

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime/analyzers.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime/analyzers/dotnet.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime/analyzers/dotnet/cs.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime/analyzers/dotnet/cs/SpacetimeDB.BSATN.Codegen.dll.meta

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime/lib.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime/lib/net8.0.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/csharp/unity-meta-skeleton~/spacetimedb.bsatn.runtime/lib/net8.0/SpacetimeDB.BSATN.Runtime.dll.meta

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)