Skip to content

Commit 629f070

Browse files
authored
Run tests using .NET 8.0 (#155)
* Set EnableUnsafeBinaryFormatterSerialization to true
1 parent e112150 commit 629f070

File tree

10 files changed

+31
-21
lines changed

10 files changed

+31
-21
lines changed

.github/workflows/GenerateAsyncCode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup .NET
2222
uses: actions/setup-dotnet@v4
2323
with:
24-
dotnet-version: 6.0.x
24+
dotnet-version: 8.0.x
2525

2626
- name: Generate Async code
2727
run: |

CoreDistributedCache/NHibernate.Caches.CoreDistributedCache.Tests/NHibernate.Caches.CoreDistributedCache.Tests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
<PropertyGroup>
44
<Product>NHibernate.Caches.CoreDistributedCache</Product>
55
<Description>Unit tests of cache provider for NHibernate using .Net Core IDistributedCache (Microsoft.Extensions.Caching.Abstractions).</Description>
6-
<TargetFrameworks>net461;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net461;net8.0</TargetFrameworks>
7+
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
78
<IsTestProject>true</IsTestProject>
89
</PropertyGroup>
910
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
1011
<DefineConstants>NETFX;$(DefineConstants)</DefineConstants>
1112
</PropertyGroup>
12-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
13+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
1314
<OutputType>Exe</OutputType>
1415
<GenerateProgramFile>false</GenerateProgramFile>
1516
</PropertyGroup>
@@ -28,7 +29,7 @@
2829
<PackageReference Include="NSubstitute" Version="3.1.0" />
2930
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
3031
</ItemGroup>
31-
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
32+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
3233
<PackageReference Include="NUnitLite" Version="3.14.0" />
3334
</ItemGroup>
3435
</Project>

CoreMemoryCache/NHibernate.Caches.CoreMemoryCache.Tests/NHibernate.Caches.CoreMemoryCache.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<PropertyGroup>
44
<Product>NHibernate.Caches.CoreMemoryCache</Product>
55
<Description>Unit tests of cache provider for NHibernate using .Net Core MemoryCache (Microsoft.Extensions.Caching.Memory).</Description>
6-
<TargetFrameworks>net461;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net461;net8.0</TargetFrameworks>
77
<IsTestProject>true</IsTestProject>
88
</PropertyGroup>
99
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
1010
<DefineConstants>NETFX;$(DefineConstants)</DefineConstants>
1111
</PropertyGroup>
12-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
12+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
1313
<OutputType>Exe</OutputType>
1414
<GenerateProgramFile>false</GenerateProgramFile>
1515
</PropertyGroup>
@@ -22,7 +22,7 @@
2222
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
2323
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
2424
</ItemGroup>
25-
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
25+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
2626
<PackageReference Include="NUnitLite" Version="3.14.0" />
2727
</ItemGroup>
2828
</Project>

NHibernate.Caches.Common.Tests/NHibernate.Caches.Common.Tests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
<PropertyGroup>
44
<Product>NHibernate.Caches.Common.Tests</Product>
55
<Description>Unit tests base for cache providers.</Description>
6-
<TargetFrameworks>net461;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net461;net8.0</TargetFrameworks>
7+
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
78
<IsTestProject>true</IsTestProject>
89
</PropertyGroup>
910
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
1011
<DefineConstants>NETFX;$(DefineConstants)</DefineConstants>
1112
</PropertyGroup>
12-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
13+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
1314
<OutputType>Exe</OutputType>
1415
<GenerateProgramFile>false</GenerateProgramFile>
1516
</PropertyGroup>
@@ -20,7 +21,7 @@
2021
<PackageReference Include="NHibernate" Version="5.2.0" />
2122
<PackageReference Include="NSubstitute" Version="3.1.0" />
2223
</ItemGroup>
23-
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
24+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
2425
<PackageReference Include="NUnitLite" Version="3.14.0" />
2526
</ItemGroup>
2627
<ItemGroup>

RtMemoryCache/NHibernate.Caches.RtMemoryCache.Tests/NHibernate.Caches.RtMemoryCache.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<PropertyGroup>
44
<Product>NHibernate.Caches.RtMemoryCache</Product>
55
<Description>Unit tests of cache provider for NHibernate using MemoryCache.</Description>
6-
<TargetFrameworks>net461;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net461;net8.0</TargetFrameworks>
77
<IsTestProject>true</IsTestProject>
88
</PropertyGroup>
99
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
1010
<DefineConstants>NETFX;$(DefineConstants)</DefineConstants>
1111
</PropertyGroup>
12-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
12+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
1313
<OutputType>Exe</OutputType>
1414
<GenerateProgramFile>false</GenerateProgramFile>
1515
</PropertyGroup>
@@ -26,7 +26,7 @@
2626
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
2727
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
2828
</ItemGroup>
29-
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
29+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
3030
<PackageReference Include="NUnitLite" Version="3.14.0" />
3131
</ItemGroup>
3232
</Project>

StackExchangeRedis/NHibernate.Caches.StackExchangeRedis.Tests/NHibernate.Caches.StackExchangeRedis.Tests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
<PropertyGroup>
44
<Product>NHibernate.Caches.StackExchangeRedis.Tests</Product>
55
<Description>Unit tests of cache provider NHibernate using StackExchange.Redis.</Description>
6-
<TargetFrameworks>net461;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net461;net8.0</TargetFrameworks>
77
<ImplicitlyExpandNETStandardFacades>false</ImplicitlyExpandNETStandardFacades>
8+
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
89
<IsTestProject>true</IsTestProject>
910
</PropertyGroup>
1011
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
1112
<DefineConstants>NETFX;$(DefineConstants)</DefineConstants>
1213
</PropertyGroup>
13-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
14+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
1415
<OutputType>Exe</OutputType>
1516
<GenerateProgramFile>false</GenerateProgramFile>
1617
</PropertyGroup>
@@ -24,7 +25,7 @@
2425
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
2526
<PackageReference Include="NSubstitute" Version="3.1.0" />
2627
</ItemGroup>
27-
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
28+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
2829
<PackageReference Include="NUnitLite" Version="3.14.0" />
2930
<PackageReference Include="System.Runtime.Caching" Version="4.5.0" />
3031
</ItemGroup>

Util/NHibernate.Caches.Util.JsonSerializer.Tests/NHibernate.Caches.Util.JsonSerializer.Tests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
<PropertyGroup>
44
<Product>NHibernate.Caches.Util.JsonSerializer.Tests</Product>
55
<Description>Unit tests for json serializer.</Description>
6-
<TargetFrameworks>net461;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net461;net8.0</TargetFrameworks>
7+
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
78
<IsTestProject>true</IsTestProject>
89
</PropertyGroup>
910
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
1011
<DefineConstants>NETFX;$(DefineConstants)</DefineConstants>
1112
</PropertyGroup>
12-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
13+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
1314
<OutputType>Exe</OutputType>
1415
<GenerateProgramFile>false</GenerateProgramFile>
1516
</PropertyGroup>
@@ -21,7 +22,7 @@
2122
<PackageReference Include="log4net" Version="2.0.17" />
2223
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
2324
</ItemGroup>
24-
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
25+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
2526
<PackageReference Include="NUnitLite" Version="3.14.0" />
2627
</ItemGroup>
2728
</Project>

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ configuration:
66
environment:
77
global:
88
netTargetFx: net461
9-
coreTargetFx: net6.0
9+
coreTargetFx: net8.0
1010
matrix:
1111
- tests: net
1212
- tests: core

buildcommon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<property name="key.file" value="../NHibernate.Caches.snk" />
88

99
<property name="net.target-fx" value="net461" />
10-
<property name="net.core-fx" value="net6.0" />
10+
<property name="net.core-fx" value="net8.0" />
1111

1212
<property name="nant-version.current" value="${assemblyname::get-version(assembly::get-name(nant::get-assembly()))}" />
1313
<property name="nant-version.required" value="0.85.2478.0" />

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100",
4+
"rollForward": "latestFeature"
5+
}
6+
}

0 commit comments

Comments
 (0)