Skip to content

Commit 39aa77c

Browse files
committed
Added cross-compilation for .NET 9. Fixes #2116
1 parent ac9c155 commit 39aa77c

File tree

19 files changed

+95
-25
lines changed

19 files changed

+95
-25
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v3
1818
with:
19-
dotnet-version: '8.0.x'
19+
dotnet-version: '9.0.x'
2020
- name: Restore dependencies
2121
run: dotnet restore
2222
- name: Build
2323
run: dotnet build --no-restore
2424
- name: Test
25-
run: dotnet test -s build/tests.runsettings --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=\"json,lcov\" /p:MergeWith=../../coverage/lcov.json /p:CoverletOutput=../../coverage/lcov
25+
run: dotnet test --no-build -s build/tests.runsettings --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=\"json,lcov\" /p:MergeWith=../../coverage/lcov.json /p:CoverletOutput=../../coverage/lcov
2626
- name: Coveralls
2727
uses: coverallsapp/github-action@master
2828
with:

.github/workflows/dotnet_win.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v3
1818
with:
19-
dotnet-version: '8.0.x'
19+
dotnet-version: '9.0.x'
2020
- name: Restore dependencies
2121
run: dotnet restore
2222
- name: Build
2323
run: dotnet build --no-restore
2424
- name: Test
25-
run: dotnet test
25+
run: dotnet test --no-build

.github/workflows/publish_to_nuget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v3
1818
with:
19-
dotnet-version: '8.0.x'
19+
dotnet-version: '9.0.x'
2020
source-url: https://api.nuget.org/v3/index.json
2121
env:
2222
NUGET_AUTH_TOKEN: ${{secrets.NugetAuthToken}}

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>net8.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
44
</PropertyGroup>
55

66
<PropertyGroup Label="Package information">
7-
<Version>11.1.0</Version>
7+
<Version>12.0.0</Version>
88
<Authors>Piranha CMS</Authors>
99
<Company>Piranha CMS</Company>
1010
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>

core/Piranha.AspNetCore/Piranha.AspNetCore.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@
1919

2020
<ItemGroup>
2121
<PackageReference Include="X.Web.Sitemap" Version="2.10.1" />
22+
</ItemGroup>
23+
24+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2225
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.0" />
2326
</ItemGroup>
2427

28+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
29+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.2" />
30+
</ItemGroup>
31+
2532
</Project>

core/Piranha.Manager.Localization/Piranha.Manager.Localization.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
1010
</PropertyGroup>
1111

12-
<ItemGroup>
12+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
1313
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
1414
</ItemGroup>
1515

16+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
17+
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.2" />
18+
</ItemGroup>
19+
1620
</Project>

core/Piranha.Manager/Piranha.Manager.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616
<ProjectReference Include="..\Piranha.Manager.Localization\Piranha.Manager.Localization.csproj" />
1717
</ItemGroup>
1818

19-
<ItemGroup>
19+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2020
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
2121
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.0" />
2222
</ItemGroup>
2323

24+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
25+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.2" />
26+
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.2" />
27+
</ItemGroup>
28+
2429
<ItemGroup>
2530
<EmbeddedResource Include="assets\dist\**\*" />
2631
</ItemGroup>

core/Piranha/Piranha.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,20 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Markdig" Version="0.39.1" />
19+
<PackageReference Include="Markdig" Version="0.40.0" />
2020
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
21+
</ItemGroup>
22+
23+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2124
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
2225
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
2326
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
2427
</ItemGroup>
2528

29+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
30+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.2" />
31+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.2" />
32+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.2" />
33+
</ItemGroup>
34+
2635
</Project>

data/Piranha.Data.EF.MySql/Piranha.Data.EF.MySql.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
<ProjectReference Include="..\..\core\Piranha\Piranha.csproj" />
1515
</ItemGroup>
1616

17-
<ItemGroup>
18-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.1" />
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
18+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.3" />
19+
</ItemGroup>
20+
21+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
22+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="9.0.0-preview.3.efcore.9.0.0" />
1923
</ItemGroup>
2024

2125
</Project>

data/Piranha.Data.EF.PostgreSql/Piranha.Data.EF.PostgreSql.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
<ProjectReference Include="..\..\core\Piranha\Piranha.csproj" />
1515
</ItemGroup>
1616

17-
<ItemGroup>
18-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
17+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
18+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
19+
</ItemGroup>
20+
21+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
22+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
1923
</ItemGroup>
2024

2125
</Project>

0 commit comments

Comments
 (0)