CI: Fix of C# tests failures #4120
Merged
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.
Description of Changes
This PR fixes C#-related CI failures when testing against
v1.12.0before the corresponding NuGet packages are available on nuget.org.crates/bindings-csharp/{BSATN.Runtime,Runtime}with-c Releaseso the configured local package sources (bin/Release) actually contain the.nupkgs../sdks/csharp/tools~/write-nuget-config.shin CI to generate aNuGet.Configthat mapsSpacetimeDB.BSATN.Runtime/SpacetimeDB.Runtimeto those local sources (withnuget.orgas fallback for non-SpacetimeDB dependencies).dotnet restore --configfile NuGet.Configstep before tests, andrun dotnet test --no-restore, so restore always uses the intended config and does not “accidentally” restore fromnuget.org.write-nuget-config.sh: Make NuGet config discovery + mapping deterministicNuGet.Config(capitalized) and include<clear />+ an explicitnuget.orgsource to avoid inherited sources and to keepPackageSourceMappingfunctional.NuGet.Configsodotnet publish/packinvoked from templates (outsidesdks/csharp/) still discovers the same override behavior.PackageSourceMappingrestore failuresRelease, and when repo-rootNuGet.Configexists, performdotnet restore --configfile ...+dotnet pack --no-restoreso pack/restore are evaluated with the same sources/mapping.NuGet.Configcasing for Linux discovery and ensurenuget.orgexists as a source for the fallback mapping.API and ABI breaking changes
No changes
Expected complexity level and risk
1
Testing