Skip to content

Commit

Permalink
.net 9 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
twcclegg authored Nov 13, 2024
1 parent 8bb59ed commit 0471ad2
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_and_run_unit_tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Add zip files required for running tests
run: |
(cd resources/geocoding; zip -r ../../resources/geocoding.zip *)
Expand All @@ -25,6 +25,6 @@ jobs:
- name: Build solution
run: dotnet build --no-restore
working-directory: ./csharp
- name: Test solution targeting dotnet8.0 only
run: dotnet test --no-build --verbosity normal -p:TargetFrameworks=net8.0
- name: Test solution targeting dotnet9.0 only
run: dotnet test --no-build --verbosity normal -p:TargetFrameworks=net9.0
working-directory: ./csharp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x
dotnet-version: 9.x
- name: Get new metadata information and create new GitHub release
timeout-minutes: 30
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Add zip files required for running tests
run: |
Compress-Archive -Path "resources\geocoding\*" -DestinationPath "resources\geocoding.zip"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_performance_tests_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Run performance tests
run: dotnet run -c Release --framework net8.0
run: dotnet run -c Release --framework net9.0
working-directory: ./csharp/PhoneNumbers.PerformanceTest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netframework4.8;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netframework4.8;net8.0;net9.0</TargetFrameworks>
<NoWarn>$(NoWarn);1591;CA1014;CA1062;CA1707</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
Expand All @@ -10,7 +10,7 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net8.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageId>libphonenumber-csharp.extensions</PackageId>
<VersionPrefix>$(APPVEYOR_BUILD_VERSION)</VersionPrefix>
<Authors>Thomas Clegg</Authors>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<PackageTags>phonenumber phone libphonenumber e164 e.164 international extensions</PackageTags>
<PackageProjectUrl>https://github.com/twcclegg/libphonenumber-csharp</PackageProjectUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netframework4.8;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netframework4.8;net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net8.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions csharp/PhoneNumbers.Test/PhoneNumbers.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netframework4.8;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netframework4.8;net8.0;net9.0</TargetFrameworks>
<AssemblyName>PhoneNumbers.Test</AssemblyName>
<PackageId>PhoneNumbers.Test</PackageId>
<DebugType>full</DebugType>
<NoWarn>$(NoWarn);CA1014;CA1707</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net8.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions csharp/PhoneNumbers/PhoneNumbers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageId>libphonenumber-csharp</PackageId>
<VersionPrefix>$(APPVEYOR_BUILD_VERSION)</VersionPrefix>
<Authors>Patrick Mézard;Thomas Clegg;Jarrod Alexander;Google;libphonenumber contributors</Authors>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<PackageTags>phonenumber phone libphonenumber e164 e.164 international</PackageTags>
<PackageProjectUrl>https://github.com/twcclegg/libphonenumber-csharp</PackageProjectUrl>
Expand All @@ -25,7 +25,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0' Or '$(TargetFramework)' == 'net8.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down

0 comments on commit 0471ad2

Please sign in to comment.