From 43574cae9c3100ca99ecb6ab3ed2063a73253f72 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 10:09:49 -0700 Subject: [PATCH 01/16] Test changes to ci and csharp github workflows --- .github/workflows/ci.yml | 14 ++++++++++++++ .github/workflows/csharp-test.yml | 1 + 2 files changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8adaa8396d6..7e1186a6231 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,6 +69,20 @@ jobs: if: runner.os == 'Windows' - name: Install psycopg2 run: python -m pip install psycopg2-binary + - name: Build and pack C# SDK + run: | + cd sdks/csharp + dotnet pack SpacetimeDB.ClientSDK/SpacetimeDB.ClientSDK.csproj -o ../../nupkgs + # Create a local NuGet.config that points to the local nupkgs directory + cat > NuGet.config << EOF + + + + + + + + EOF - name: Run smoketests # Note: clear_database and replication only work in private run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication diff --git a/.github/workflows/csharp-test.yml b/.github/workflows/csharp-test.yml index c6721481fef..a855bb21f49 100644 --- a/.github/workflows/csharp-test.yml +++ b/.github/workflows/csharp-test.yml @@ -38,6 +38,7 @@ jobs: # if they're not pushed to NuGet. # See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file. cd sdks/csharp + dotnet pack SpacetimeDB.ClientSDK/SpacetimeDB.ClientSDK.csproj -o ../../nupkgs ./tools~/write-nuget-config.sh ../.. - name: Run .NET tests From e4ba1c8b3cbf0b1717e0f9164123e27336b770e5 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 10:21:20 -0700 Subject: [PATCH 02/16] Tweaked the github runner --- .github/workflows/csharp-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/csharp-test.yml b/.github/workflows/csharp-test.yml index a855bb21f49..a552377131f 100644 --- a/.github/workflows/csharp-test.yml +++ b/.github/workflows/csharp-test.yml @@ -38,7 +38,7 @@ jobs: # if they're not pushed to NuGet. # See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file. cd sdks/csharp - dotnet pack SpacetimeDB.ClientSDK/SpacetimeDB.ClientSDK.csproj -o ../../nupkgs + dotnet pack ./SpacetimeDB.ClientSDK/SpacetimeDB.ClientSDK.csproj -o ../../nupkgs ./tools~/write-nuget-config.sh ../.. - name: Run .NET tests From 988528af30b233941d7405e2ef3b90191268210f Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 10:29:35 -0700 Subject: [PATCH 03/16] Another update to the csharp-test.yml file --- .github/workflows/csharp-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/csharp-test.yml b/.github/workflows/csharp-test.yml index a552377131f..65bfbfc859d 100644 --- a/.github/workflows/csharp-test.yml +++ b/.github/workflows/csharp-test.yml @@ -38,7 +38,7 @@ jobs: # if they're not pushed to NuGet. # See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file. cd sdks/csharp - dotnet pack ./SpacetimeDB.ClientSDK/SpacetimeDB.ClientSDK.csproj -o ../../nupkgs + dotnet pack SpacetimeDB.ClientSDK.csproj -o ../../nupkgs ./tools~/write-nuget-config.sh ../.. - name: Run .NET tests From 4996e764bf782b62b07c0109bcdd2b715d2bdf11 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 10:56:19 -0700 Subject: [PATCH 04/16] Test another fix of csharp test --- .github/workflows/csharp-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/csharp-test.yml b/.github/workflows/csharp-test.yml index 65bfbfc859d..1e1671881e6 100644 --- a/.github/workflows/csharp-test.yml +++ b/.github/workflows/csharp-test.yml @@ -127,6 +127,9 @@ jobs: - name: Run regression tests run: | + cd sdks/csharp + dotnet build + cd ../.. bash sdks/csharp/tools~/run-regression-tests.sh tools/check-diff.sh sdks/csharp/examples~/regression-tests || { echo 'Error: Bindings are dirty. Please run `sdks/csharp/tools~/gen-regression-tests.sh`.' From f335c61c5d20dbabc8fafff5148cbe1e83037c29 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 11:16:12 -0700 Subject: [PATCH 05/16] Update client project file to reference the local SDK --- .../regression-tests/republishing/client/client.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/csharp/examples~/regression-tests/republishing/client/client.csproj b/sdks/csharp/examples~/regression-tests/republishing/client/client.csproj index 3afdea6e783..759ea6f4a26 100644 --- a/sdks/csharp/examples~/regression-tests/republishing/client/client.csproj +++ b/sdks/csharp/examples~/regression-tests/republishing/client/client.csproj @@ -8,7 +8,7 @@ - + From e27be34e80ac7fe637f8d64ef331172039921ffe Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 13:14:54 -0700 Subject: [PATCH 06/16] Another update to the ci.yml workflow --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e1186a6231..9adbb7df3f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,10 +70,10 @@ jobs: - name: Install psycopg2 run: python -m pip install psycopg2-binary - name: Build and pack C# SDK - run: | + run: | cd sdks/csharp - dotnet pack SpacetimeDB.ClientSDK/SpacetimeDB.ClientSDK.csproj -o ../../nupkgs - # Create a local NuGet.config that points to the local nupkgs directory + dotnet build -c Release + dotnet pack -c Release -o ../../nupkgs cat > NuGet.config << EOF From 355e0399dd125a451770e25ad6a2da69ed70a38c Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 13:31:48 -0700 Subject: [PATCH 07/16] Fixed ci.yml build issue with by specifying build project --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9adbb7df3f7..fe580c2d167 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,8 +72,8 @@ jobs: - name: Build and pack C# SDK run: | cd sdks/csharp - dotnet build -c Release - dotnet pack -c Release -o ../../nupkgs + dotnet build SpacetimeDB.ClientSDK.csproj -c Release + dotnet pack SpacetimeDB.ClientSDK.csproj -c Release -o ../../nupkgs cat > NuGet.config << EOF From d07f9e21cb2e4b396b5f3f5e55f0d3f8ba0dddba Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 14:04:13 -0700 Subject: [PATCH 08/16] Adding packageSoruceMapping to C# SDK CI building --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe580c2d167..a041aef07bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,6 +81,11 @@ jobs: + + + + + EOF - name: Run smoketests From 5e137e1e83268e8b6c770aee79287583dbe43d90 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 15:38:17 -0700 Subject: [PATCH 09/16] Update smoketest quickstart to force local NuGet packages --- smoketests/tests/quickstart.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index 4b67578f559..47da4aee98a 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -43,17 +43,13 @@ def _parse_quickstart(doc_path: Path, language: str) -> str: # So we could have a different db for each language return "\n".join(blocks).replace("quickstart-chat", f"quickstart-chat-{language}") + end - def _dotnet_add_package(project_path: Path, package_name: str, source_path: Path): """Add a local NuGet package to a .NET project""" - sources = run_cmd("dotnet", "nuget", "list", "source", cwd=project_path, capture_stderr=True) - # Is the source already added? - if package_name in sources: - run_cmd("dotnet", "nuget", "remove", "source", package_name, cwd=project_path, capture_stderr=True) - run_cmd("dotnet", "nuget", "add", "source", source_path, "--name", package_name, cwd=project_path, - capture_stderr=True) - run_cmd("dotnet", "add", "package", package_name, cwd=project_path, capture_stderr=True) - + run_cmd("dotnet", "nuget", "add", "source", source_path, "--name", "local-source", cwd=project_path, + capture_stderr=True) + run_cmd("dotnet", "add", "package", package_name, "--source", source_path, "--no-restore", cwd=project_path, + capture_stderr=True) + run_cmd("dotnet", "restore", "--source", source_path, cwd=project_path, capture_stderr=True) class BaseQuickstart(Smoketest): AUTOPUBLISH = False From 192f9c255ce9ffd3d32262ccd5997caf215158b2 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 16:06:37 -0700 Subject: [PATCH 10/16] Updating to use nupkgs directory --- smoketests/tests/quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index 47da4aee98a..adb5c9d2645 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -246,7 +246,7 @@ def sdk_setup(self, path: Path): def server_postprocess(self, server_path: Path): _dotnet_add_package(server_path, "SpacetimeDB.Runtime", - (STDB_DIR / "crates/bindings-csharp/Runtime").absolute()) + (STDB_DIR / "nupkgs").absolute()) def test_quickstart(self): """Run the C# quickstart guides for server and client.""" From 1de944a415b44c107073e9cb4b5e30289dbcb64d Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 16:33:10 -0700 Subject: [PATCH 11/16] Updating quickstart python script --- smoketests/tests/quickstart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index adb5c9d2645..bf059368655 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -245,8 +245,8 @@ def sdk_setup(self, path: Path): _dotnet_add_package(path, "SpacetimeDB.ClientSDK", (STDB_DIR / "sdks/csharp").absolute()) def server_postprocess(self, server_path: Path): - _dotnet_add_package(server_path, "SpacetimeDB.Runtime", - (STDB_DIR / "nupkgs").absolute()) + _dotnet_add_package(server_path, "BSATN.Runtime", + (STDB_DIR / "crates/bindings-csharp/BSATN.Runtime").absolute()) def test_quickstart(self): """Run the C# quickstart guides for server and client.""" From 97f3a59cf1450bc81dd9428aac3d1f08937e582f Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 15 Oct 2025 17:10:49 -0700 Subject: [PATCH 12/16] Reverting changes to quickstart.py --- smoketests/tests/quickstart.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index bf059368655..2c109fe653e 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -43,13 +43,16 @@ def _parse_quickstart(doc_path: Path, language: str) -> str: # So we could have a different db for each language return "\n".join(blocks).replace("quickstart-chat", f"quickstart-chat-{language}") + end + def _dotnet_add_package(project_path: Path, package_name: str, source_path: Path): """Add a local NuGet package to a .NET project""" - run_cmd("dotnet", "nuget", "add", "source", source_path, "--name", "local-source", cwd=project_path, - capture_stderr=True) - run_cmd("dotnet", "add", "package", package_name, "--source", source_path, "--no-restore", cwd=project_path, - capture_stderr=True) - run_cmd("dotnet", "restore", "--source", source_path, cwd=project_path, capture_stderr=True) + sources = run_cmd("dotnet", "nuget", "list", "source", cwd=project_path, capture_stderr=True) + # Is the source already added? + if package_name in sources: + run_cmd("dotnet", "nuget", "remove", "source", package_name, cwd=project_path, capture_stderr=True) + run_cmd("dotnet", "nuget", "add", "source", source_path, "--name", package_name, cwd=project_path, + capture_stderr=True) + run_cmd("dotnet", "add", "package", package_name, cwd=project_path, capture_stderr=True) class BaseQuickstart(Smoketest): AUTOPUBLISH = False @@ -245,8 +248,8 @@ def sdk_setup(self, path: Path): _dotnet_add_package(path, "SpacetimeDB.ClientSDK", (STDB_DIR / "sdks/csharp").absolute()) def server_postprocess(self, server_path: Path): - _dotnet_add_package(server_path, "BSATN.Runtime", - (STDB_DIR / "crates/bindings-csharp/BSATN.Runtime").absolute()) + _dotnet_add_package(server_path, "SpacetimeDB.Runtime", + (STDB_DIR / "crates/bindings-csharp/Runtime").absolute()) def test_quickstart(self): """Run the C# quickstart guides for server and client.""" From 9deb02788c04661f639ad560ba05260b15160d08 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Tue, 21 Oct 2025 09:24:14 -0700 Subject: [PATCH 13/16] Update quickstart smoketest to rebuild the NuGet packages before test --- smoketests/tests/quickstart.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index 2c109fe653e..ce03ffa2d41 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -46,6 +46,10 @@ def _parse_quickstart(doc_path: Path, language: str) -> str: def _dotnet_add_package(project_path: Path, package_name: str, source_path: Path): """Add a local NuGet package to a .NET project""" + # Clean the NuGet cache and Build the packages + run_cmd("dotnet", "nuget", "locals", "all", "--clear", cwd=project_path, capture_stderr=True) + run_cmd("dotnet", "pack", "--configuration", "Release", cwd=source_path, capture_stderr=True) + sources = run_cmd("dotnet", "nuget", "list", "source", cwd=project_path, capture_stderr=True) # Is the source already added? if package_name in sources: From fb4d48802e0f55ca1248b28dcc29d8d305717c6b Mon Sep 17 00:00:00 2001 From: rekhoff Date: Tue, 21 Oct 2025 11:55:32 -0700 Subject: [PATCH 14/16] Be a bit more explicit on pulling in the local ClientSDK dependency --- smoketests/tests/quickstart.py | 39 +++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index ce03ffa2d41..804012b5edb 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -46,17 +46,40 @@ def _parse_quickstart(doc_path: Path, language: str) -> str: def _dotnet_add_package(project_path: Path, package_name: str, source_path: Path): """Add a local NuGet package to a .NET project""" - # Clean the NuGet cache and Build the packages - run_cmd("dotnet", "nuget", "locals", "all", "--clear", cwd=project_path, capture_stderr=True) - run_cmd("dotnet", "pack", "--configuration", "Release", cwd=source_path, capture_stderr=True) + # For ClientSDK, always build from source + if package_name == "SpacetimeDB.ClientSDK": + sdk_project = source_path / f"{package_name}.csproj" + if sdk_project.exists(): + # Clean and rebuild the specific SDK project + run_cmd("dotnet", "clean", str(sdk_project), "--configuration", "Release", + cwd=source_path, capture_stderr=True) + run_cmd("dotnet", "restore", str(sdk_project), + cwd=source_path, capture_stderr=True) + run_cmd("dotnet", "build", str(sdk_project), "--configuration", "Release", + "-p:PackageOutputPath=\\\"" + str(source_path) + "\\\"", + cwd=source_path, capture_stderr=True) + # Ensure we have the local package source set up sources = run_cmd("dotnet", "nuget", "list", "source", cwd=project_path, capture_stderr=True) - # Is the source already added? if package_name in sources: - run_cmd("dotnet", "nuget", "remove", "source", package_name, cwd=project_path, capture_stderr=True) - run_cmd("dotnet", "nuget", "add", "source", source_path, "--name", package_name, cwd=project_path, - capture_stderr=True) - run_cmd("dotnet", "add", "package", package_name, cwd=project_path, capture_stderr=True) + run_cmd("dotnet", "nuget", "remove", "source", package_name, + cwd=project_path, capture_stderr=True) + + # Add the local package source + run_cmd("dotnet", "nuget", "add", "source", str(source_path), "--name", package_name, + cwd=project_path, capture_stderr=True) + + # Remove the package if it exists to force an update + run_cmd("dotnet", "remove", "package", package_name, + cwd=project_path, capture_stderr=True, check=False) + + # Add the package from the local source with version wildcard to ensure we get the latest + run_cmd("dotnet", "add", "package", package_name, "--source", str(source_path), + "--no-restore", "--prerelease", cwd=project_path, capture_stderr=True) + + # Explicitly restore and build the project to ensure everything is up to date + run_cmd("dotnet", "restore", cwd=project_path, capture_stderr=True) + run_cmd("dotnet", "build", "--no-restore", cwd=project_path, capture_stderr=True) class BaseQuickstart(Smoketest): AUTOPUBLISH = False From 1ae51720d588858d0b3b518081337a4fbf68400b Mon Sep 17 00:00:00 2001 From: rekhoff Date: Tue, 21 Oct 2025 12:43:45 -0700 Subject: [PATCH 15/16] Ensuring SpacetimeDB.BSATN.Runtime is also included in test updates --- smoketests/tests/quickstart.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index 804012b5edb..0059a4611fb 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -49,18 +49,41 @@ def _dotnet_add_package(project_path: Path, package_name: str, source_path: Path # For ClientSDK, always build from source if package_name == "SpacetimeDB.ClientSDK": sdk_project = source_path / f"{package_name}.csproj" - if sdk_project.exists(): - # Clean and rebuild the specific SDK project + bsatn_runtime_path = (STDB_DIR / "crates/bindings-csharp/BSATN.Runtime").absolute() + + if sdk_project.exists() and bsatn_runtime_path.exists(): + # Clean the specific SDK project run_cmd("dotnet", "clean", str(sdk_project), "--configuration", "Release", cwd=source_path, capture_stderr=True) + + # Add BSATN.Runtime local source + run_cmd("dotnet", "nuget", "add", "source", str(bsatn_runtime_path), "--name", "bsatn-runtime", + cwd=source_path, capture_stderr=True) + + # Build BSATN.Runtime first + bsatn_csproj = bsatn_runtime_path / "BSATN.Runtime.csproj" + if bsatn_csproj.exists(): + run_cmd("dotnet", "build", str(bsatn_csproj), "--configuration", "Release", + cwd=bsatn_runtime_path, capture_stderr=True) + + # Restore and build the specific SDK project run_cmd("dotnet", "restore", str(sdk_project), cwd=source_path, capture_stderr=True) run_cmd("dotnet", "build", str(sdk_project), "--configuration", "Release", - "-p:PackageOutputPath=\\\"" + str(source_path) + "\\\"", + f"-p:PackageOutputPath=\"{source_path}\"", cwd=source_path, capture_stderr=True) # Ensure we have the local package source set up sources = run_cmd("dotnet", "nuget", "list", "source", cwd=project_path, capture_stderr=True) + + # Add BSATN.Runtime source if it exists + bsatn_runtime_path = (STDB_DIR / "crates/bindings-csharp/BSATN.Runtime").absolute() + if bsatn_runtime_path.exists(): + if "bsatn-runtime" not in sources: + run_cmd("dotnet", "nuget", "add", "source", str(bsatn_runtime_path), "--name", "bsatn-runtime", + cwd=project_path, capture_stderr=True) + + # Handle the main package source if package_name in sources: run_cmd("dotnet", "nuget", "remove", "source", package_name, cwd=project_path, capture_stderr=True) From 5171ca9ef6888eccf8dd1e3ae8ae29c4e0023240 Mon Sep 17 00:00:00 2001 From: rekhoff Date: Wed, 22 Oct 2025 09:09:55 -0700 Subject: [PATCH 16/16] Testing behavior after removing dotnet_add_package actions --- smoketests/tests/quickstart.py | 59 +--------------------------------- 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/smoketests/tests/quickstart.py b/smoketests/tests/quickstart.py index 0059a4611fb..838ddad2eb7 100644 --- a/smoketests/tests/quickstart.py +++ b/smoketests/tests/quickstart.py @@ -45,64 +45,7 @@ def _parse_quickstart(doc_path: Path, language: str) -> str: def _dotnet_add_package(project_path: Path, package_name: str, source_path: Path): - """Add a local NuGet package to a .NET project""" - # For ClientSDK, always build from source - if package_name == "SpacetimeDB.ClientSDK": - sdk_project = source_path / f"{package_name}.csproj" - bsatn_runtime_path = (STDB_DIR / "crates/bindings-csharp/BSATN.Runtime").absolute() - - if sdk_project.exists() and bsatn_runtime_path.exists(): - # Clean the specific SDK project - run_cmd("dotnet", "clean", str(sdk_project), "--configuration", "Release", - cwd=source_path, capture_stderr=True) - - # Add BSATN.Runtime local source - run_cmd("dotnet", "nuget", "add", "source", str(bsatn_runtime_path), "--name", "bsatn-runtime", - cwd=source_path, capture_stderr=True) - - # Build BSATN.Runtime first - bsatn_csproj = bsatn_runtime_path / "BSATN.Runtime.csproj" - if bsatn_csproj.exists(): - run_cmd("dotnet", "build", str(bsatn_csproj), "--configuration", "Release", - cwd=bsatn_runtime_path, capture_stderr=True) - - # Restore and build the specific SDK project - run_cmd("dotnet", "restore", str(sdk_project), - cwd=source_path, capture_stderr=True) - run_cmd("dotnet", "build", str(sdk_project), "--configuration", "Release", - f"-p:PackageOutputPath=\"{source_path}\"", - cwd=source_path, capture_stderr=True) - - # Ensure we have the local package source set up - sources = run_cmd("dotnet", "nuget", "list", "source", cwd=project_path, capture_stderr=True) - - # Add BSATN.Runtime source if it exists - bsatn_runtime_path = (STDB_DIR / "crates/bindings-csharp/BSATN.Runtime").absolute() - if bsatn_runtime_path.exists(): - if "bsatn-runtime" not in sources: - run_cmd("dotnet", "nuget", "add", "source", str(bsatn_runtime_path), "--name", "bsatn-runtime", - cwd=project_path, capture_stderr=True) - - # Handle the main package source - if package_name in sources: - run_cmd("dotnet", "nuget", "remove", "source", package_name, - cwd=project_path, capture_stderr=True) - - # Add the local package source - run_cmd("dotnet", "nuget", "add", "source", str(source_path), "--name", package_name, - cwd=project_path, capture_stderr=True) - - # Remove the package if it exists to force an update - run_cmd("dotnet", "remove", "package", package_name, - cwd=project_path, capture_stderr=True, check=False) - - # Add the package from the local source with version wildcard to ensure we get the latest - run_cmd("dotnet", "add", "package", package_name, "--source", str(source_path), - "--no-restore", "--prerelease", cwd=project_path, capture_stderr=True) - - # Explicitly restore and build the project to ensure everything is up to date - run_cmd("dotnet", "restore", cwd=project_path, capture_stderr=True) - run_cmd("dotnet", "build", "--no-restore", cwd=project_path, capture_stderr=True) + """Skipping adding a local NuGet package to a .NET project""" class BaseQuickstart(Smoketest): AUTOPUBLISH = False