Skip to content

Commit 6a13dad

Browse files
committed
fix: Use correct condition to include package references
1 parent ba20c96 commit 6a13dad

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
13-
framework:
14-
- 8.0
15-
- 9.0
13+
frameworks: [
14+
{ framework: "net8.0", version: "8.0.x" },
15+
{ framework: "net9.0", version: "9.0.x" },
16+
]
1617
steps:
1718
- uses: actions/checkout@v4
1819
with:
1920
fetch-depth: 0
2021
- name: Setup .NET Core
2122
uses: actions/setup-dotnet@v4
2223
with:
23-
dotnet-version: ${{ matrix.framework }}.x
24+
dotnet-version: ${{ matrix.frameworks.version }}
2425
- name: Build
25-
run: dotnet build -c Release --framework net${{ matrix.framework }}
26+
run: dotnet build -c Release --framework ${{ matrix.frameworks.framework }}
2627
- name: Test
27-
run: dotnet test -c Release --framework net${{ matrix.framework }} --no-build
28+
run: dotnet test -c Release --framework ${{ matrix.frameworks.framework }} --no-build

src/Docker.DotNet/Docker.DotNet.csproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
<AssemblyName>Docker.DotNet</AssemblyName>
66
<LangVersion>latest</LangVersion>
77
</PropertyGroup>
8-
<ItemGroup>
8+
<ItemGroup Condition="$(TargetFramework) == 'net8.0'">
9+
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
10+
</ItemGroup>
11+
<ItemGroup Condition="$(TargetFrameworkIdentifier) == '.NETStandard'">
912
<PackageReference Include="System.Buffers" Version="4.5.1" />
1013
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
1114
<PackageReference Include="System.Net.Http.Json" Version="8.0.1" />
1215
<PackageReference Include="System.Text.Json" Version="8.0.5" />
1316
</ItemGroup>
14-
<ItemGroup Condition="$(TargetFrameworkIdentifier) == 'net9.0'">
15-
<PackageReference Include="System.IO.Pipelines" Version="9.0.0" />
16-
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
17-
<PackageReference Include="System.Text.Json" Version="9.0.0" />
18-
</ItemGroup>
1917
</Project>

0 commit comments

Comments
 (0)