Skip to content

Commit 43389dd

Browse files
authored
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".
1 parent c78df3f commit 43389dd

File tree

8 files changed

+13
-30
lines changed

8 files changed

+13
-30
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
- name: Install .NET toolchain
8989
uses: actions/setup-dotnet@v3
9090
with:
91-
global-json-file: modules/global.json
91+
global-json-file: global.json
9292
env:
9393
DOTNET_INSTALL_DIR: ~/.dotnet
9494

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- uses: dsherret/rust-toolchain-file@v1
4444
- uses: actions/setup-dotnet@v4
4545
with:
46-
global-json-file: modules/global.json
46+
global-json-file: global.json
4747
- name: Install psql (Windows)
4848
if: runner.os == 'Windows'
4949
run: choco install psql -y --no-progress
@@ -97,13 +97,13 @@ jobs:
9797

9898
- uses: actions/setup-dotnet@v3
9999
with:
100-
global-json-file: modules/global.json
100+
global-json-file: global.json
101101

102102
- name: Create /stdb dir
103103
run: |
104104
sudo mkdir /stdb
105105
sudo chmod 777 /stdb
106-
106+
107107
- name: Run cargo test
108108
#Note: Unreal tests will be run separately
109109
run: cargo test --all -- --skip unreal
@@ -130,6 +130,10 @@ jobs:
130130
- uses: dsherret/rust-toolchain-file@v1
131131
- run: echo ::add-matcher::.github/workflows/rust_matcher.json
132132

133+
- uses: actions/setup-dotnet@v3
134+
with:
135+
global-json-file: global.json
136+
133137
- name: Run cargo fmt
134138
run: cargo fmt --all -- --check
135139

.github/workflows/csharp-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup dotnet
2525
uses: actions/setup-dotnet@v3
2626
with:
27-
global-json-file: modules/global.json
27+
global-json-file: global.json
2828

2929
- name: Override NuGet packages
3030
run: |

crates/cli/src/subcommands/project/csharp/global._json

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../../global.json

demo/Blackholio/server-csharp/global.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../global.json
File renamed without changes.

sdks/csharp/examples~/quickstart-chat/server/global.json

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../global.json

0 commit comments

Comments
 (0)