Make the .NET global.json file global (#3297)

Move the global.json file to the repo root, which should make `dotnet`
resolve the correct SDK regardless of the directory it is run in.

Where a copy of the global.json file is needed, symlink it to the one at
the root.

Should fix "C#/Unity - Test Suite".
This commit is contained in:
Kim Altintop
2025-09-30 18:39:21 +02:00
committed by GitHub
parent c78df3f957
commit 43389dd4e0
8 changed files with 13 additions and 30 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ jobs:
- name: Install .NET toolchain
uses: actions/setup-dotnet@v3
with:
global-json-file: modules/global.json
global-json-file: global.json
env:
DOTNET_INSTALL_DIR: ~/.dotnet
+7 -3
View File
@@ -43,7 +43,7 @@ jobs:
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/setup-dotnet@v4
with:
global-json-file: modules/global.json
global-json-file: global.json
- name: Install psql (Windows)
if: runner.os == 'Windows'
run: choco install psql -y --no-progress
@@ -97,13 +97,13 @@ jobs:
- uses: actions/setup-dotnet@v3
with:
global-json-file: modules/global.json
global-json-file: global.json
- name: Create /stdb dir
run: |
sudo mkdir /stdb
sudo chmod 777 /stdb
- name: Run cargo test
#Note: Unreal tests will be run separately
run: cargo test --all -- --skip unreal
@@ -130,6 +130,10 @@ jobs:
- uses: dsherret/rust-toolchain-file@v1
- run: echo ::add-matcher::.github/workflows/rust_matcher.json
- uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Run cargo fmt
run: cargo fmt --all -- --check
+1 -1
View File
@@ -24,7 +24,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
global-json-file: modules/global.json
global-json-file: global.json
- name: Override NuGet packages
run: |
@@ -1,6 +0,0 @@
{
"sdk": {
"version": "8.0.400",
"rollForward": "latestMinor"
}
}
@@ -0,0 +1 @@
../../../../../../global.json
@@ -1,7 +0,0 @@
{
"sdk": {
"version": "8.0.0",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}
+1
View File
@@ -0,0 +1 @@
../../../global.json
View File
@@ -1,6 +0,0 @@
{
"sdk": {
"version": "8.0.400",
"rollForward": "latestMinor"
}
}
@@ -0,0 +1 @@
../../../../../global.json
@@ -1,6 +0,0 @@
{
"sdk": {
"version": "8.0.400",
"rollForward": "latestMinor"
}
}
@@ -0,0 +1 @@
../../../../../global.json