Skip to content

Commit 824022d

Browse files
Build with net10 for slnx support, then force net8 after that
1 parent abcf0fd commit 824022d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/dotnet-tests.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22-
23-
- name: Create global.json to enforce .NET 8 for MSBuild
24-
if: inputs.dotnet-version == '8.0.x'
25-
run: echo '{"sdk":{"version":"8.0.0","rollForward":"latestFeature"}}' > global.json
26-
2722
- name: Setup .NET
2823
uses: actions/setup-dotnet@v4
2924
with:
@@ -34,14 +29,18 @@ jobs:
3429
with:
3530
vs-version: ${{ inputs.vs-version }}
3631

32+
- name: Build
33+
run: dotnet build DotNetBuildable.slnf /p:Configuration=Release
34+
35+
- name: Create global.json to enforce .NET 8 for MSBuild
36+
if: inputs.dotnet-version == '8.0.x'
37+
run: echo '{"sdk":{"version":"8.0.0","rollForward":"latestFeature"}}' > global.json
38+
3739
- name: Log MSBuild version
3840
run: msbuild -version
3941

4042
- name: Log .NET version
4143
run: dotnet --info
4244

43-
- name: Build
44-
run: dotnet build DotNetBuildable.slnf /p:Configuration=Release
45-
4645
- name: Execute unit tests
4746
run: dotnet test Tests/Tests.csproj -c Release --framework net${{ inputs.dotnet-version == '8.0.x' && '8.0' || '10.0' }} --no-build

0 commit comments

Comments
 (0)