Skip to content

Commit c0eb9f8

Browse files
Blogbotanaclaude
andcommitted
Fix dotnet CLI -c flag broken in .NET SDK 10
Replace -c with --configuration in all workflow commands. dotnet restore/build/test no longer accept the -c shorthand in SDK 10 and pass it raw to MSBuild, which rejects it with MSB1001. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c4f77eb commit c0eb9f8

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
dotnet-version: 8.0.x
2525

2626
- name: Restore
27-
run: dotnet restore source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj -c ${{ matrix.configuration }}
27+
run: dotnet restore source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj --configuration ${{ matrix.configuration }}
2828

2929
- name: Build
30-
run: dotnet build source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj -c ${{ matrix.configuration }} --no-restore
30+
run: dotnet build source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj --configuration ${{ matrix.configuration }} --no-restore
3131

3232
- name: Pack
33-
run: dotnet pack source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj -c ${{ matrix.configuration }} --no-build --output ./nupkgs
33+
run: dotnet pack source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj --configuration ${{ matrix.configuration }} --no-build --output ./nupkgs
3434

3535
- name: Push to NuGet
3636
run: dotnet nuget push "./nupkgs/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
dotnet-version: 8.0.x
2626

2727
- name: Restore
28-
run: dotnet restore source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj -c ${{ matrix.configuration }}
28+
run: dotnet restore source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj --configuration ${{ matrix.configuration }}
2929

3030
- name: Build
31-
run: dotnet build source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj -c ${{ matrix.configuration }} --no-restore
31+
run: dotnet build source/Apibim.Revit.Extensions/Apibim.Revit.Extensions.csproj --configuration ${{ matrix.configuration }} --no-restore
3232

3333
test:
3434
runs-on: windows-latest
@@ -44,10 +44,10 @@ jobs:
4444
dotnet-version: 8.0.x
4545

4646
- name: Restore
47-
run: dotnet restore tests/Apibim.Revit.Extensions.Tests/Apibim.Revit.Extensions.Tests.csproj -c R2025
47+
run: dotnet restore tests/Apibim.Revit.Extensions.Tests/Apibim.Revit.Extensions.Tests.csproj --configuration R2025
4848

4949
- name: Test
50-
run: dotnet test tests/Apibim.Revit.Extensions.Tests/Apibim.Revit.Extensions.Tests.csproj -c R2025 --no-restore --logger "trx;LogFileName=test-results.trx"
50+
run: dotnet test tests/Apibim.Revit.Extensions.Tests/Apibim.Revit.Extensions.Tests.csproj --configuration R2025 --no-restore --logger "trx;LogFileName=test-results.trx"
5151

5252
- name: Upload test results
5353
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)