Skip to content

Commit

Permalink
Explicitly set framework for dotnet invocations
Browse files Browse the repository at this point in the history
It seems `TargetFrameworks` is conflicting with our `global.json` CI step; we
are locking the SDK to a specific version but the csproj sometimes specifies a
higher target framework.
  • Loading branch information
mqudsi committed Mar 2, 2024
1 parent 45e777d commit 76fd7e2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ jobs:
# By default, tests will be executed under the latest installed version!
- name: Create temporary global.json
run: echo '{"sdk":{"version":"${{steps.stepid.outputs.dotnet-version}}"}}' > ./global.json
- name: Restore nuget dependencies
run: dotnet restore
# - name: Restore nuget dependencies
# run: dotnet restore
# - name: Build solution
# run: dotnet build --no-restore
- name: Build solution
run: dotnet build --no-restore
run: dotnet build --framework ${{ matrix.dotnet.framework }}
- name: Run tests
run: dotnet test --no-build --verbosity normal
run: dotnet test --no-build --verbosity normal --framework ${{ matrix.dotnet.framework }}

0 comments on commit 76fd7e2

Please sign in to comment.