Skip to content

Commit

Permalink
Switch to .NET 8 (#420)
Browse files Browse the repository at this point in the history
- Update version to 8.0.0
- Update CI workflow to use .NET 8
- Remove deprecated exception serialization
- Fix test issues on .NET 8
- Run tests on all supported platforms
- Update dependencies
  • Loading branch information
Kaliumhexacyanoferrat authored Nov 23, 2023
1 parent bf6543d commit 786beea
Show file tree
Hide file tree
Showing 49 changed files with 204 additions and 251 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.100
dotnet-version: 8.0.100
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
Expand Down
12 changes: 0 additions & 12 deletions API/Content/ProviderException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.Serialization;

using GenHTTP.Api.Protocol;

Expand Down Expand Up @@ -36,17 +35,6 @@ public ProviderException(ResponseStatus status, string message, Exception inner)
Status = status;
}

protected ProviderException(SerializationInfo info, StreamingContext context) : base(info, context)
{
Status = (ResponseStatus)info.GetInt32("Status");
}

public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("Status", (int)Status);
}

#endregion

}
Expand Down
10 changes: 5 additions & 5 deletions API/GenHTTP.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand All @@ -37,7 +37,7 @@
<None Include="..\LICENSE" Pack="true" PackagePath="\" />
<None Include="..\Resources\icon.png" Pack="true" PackagePath="\" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
6 changes: 0 additions & 6 deletions API/Infrastructure/BindingException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.Serialization;

namespace GenHTTP.Api.Infrastructure
{
Expand All @@ -16,11 +15,6 @@ public BindingException(string message, Exception inner) : base(message, inner)

}

protected BindingException(SerializationInfo info, StreamingContext context) : base(info, context)
{

}

}

}
12 changes: 0 additions & 12 deletions API/Infrastructure/BuilderMissingPropertyException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.Serialization;

namespace GenHTTP.Api.Infrastructure
{
Expand Down Expand Up @@ -28,17 +27,6 @@ public BuilderMissingPropertyException(string property) : base($"Missing require
Property = property;
}

protected BuilderMissingPropertyException(SerializationInfo info, StreamingContext context) : base(info, context)
{
Property = info.GetString("Property") ?? string.Empty;
}

public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("Property", Property);
}

#endregion

}
Expand Down
6 changes: 0 additions & 6 deletions API/Infrastructure/NetworkException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.Serialization;

namespace GenHTTP.Api.Infrastructure
{
Expand All @@ -16,11 +15,6 @@ public NetworkException(string reason, Exception? inner = null) : base(reason, i

}

protected NetworkException(SerializationInfo info, StreamingContext context) : base(info, context)
{

}

}

}
6 changes: 0 additions & 6 deletions API/Protocol/ProtocolException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.Serialization;

namespace GenHTTP.Api.Protocol
{
Expand All @@ -22,11 +21,6 @@ public ProtocolException(string reason, Exception inner) : base(reason, inner)

}

protected ProtocolException(SerializationInfo info, StreamingContext context) : base(info, context)
{

}

}

}
12 changes: 6 additions & 6 deletions Engine/GenHTTP.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down Expand Up @@ -58,9 +58,9 @@
<ProjectReference Include="..\Modules\Placeholders\GenHTTP.Modules.Placeholders.csproj" />
<ProjectReference Include="..\Modules\ErrorHandling\GenHTTP.Modules.ErrorHandling.csproj" />

<PackageReference Include="System.IO.Pipelines" Version="7.0.0" />
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
10 changes: 5 additions & 5 deletions Modules/Authentication/GenHTTP.Modules.Authentication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down Expand Up @@ -43,7 +43,7 @@

<ProjectReference Include="..\..\API\GenHTTP.Api.csproj" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions Modules/AutoReload/GenHTTP.Modules.AutoReload.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down
12 changes: 6 additions & 6 deletions Modules/Basics/GenHTTP.Modules.Basics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down Expand Up @@ -45,9 +45,9 @@

<PackageReference Include="System.Linq.Async" Version="6.0.1" />

<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
12 changes: 6 additions & 6 deletions Modules/Caching/GenHTTP.Modules.Caching.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down Expand Up @@ -47,9 +47,9 @@

<PackageReference Include="PooledAwait" Version="1.0.49" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />

</ItemGroup>

Expand Down
10 changes: 5 additions & 5 deletions Modules/ClientCaching/GenHTTP.Modules.ClientCaching.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down Expand Up @@ -45,7 +45,7 @@

<ProjectReference Include="..\Basics\GenHTTP.Modules.Basics.csproj" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
10 changes: 5 additions & 5 deletions Modules/Compression/GenHTTP.Modules.Compression.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down Expand Up @@ -43,7 +43,7 @@

<ProjectReference Include="..\..\API\GenHTTP.Api.csproj" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
10 changes: 5 additions & 5 deletions Modules/Controllers/GenHTTP.Modules.Controllers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.1.0</Version>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<FileVersion>8.0.0.0</FileVersion>
<Version>8.0.0</Version>

<Authors>Andreas Nägeli</Authors>
<Company />
Expand Down Expand Up @@ -47,7 +47,7 @@
<ProjectReference Include="..\Layouting\GenHTTP.Modules.Layouting.csproj" />
<ProjectReference Include="..\Conversion\GenHTTP.Modules.Conversion.csproj" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
Loading

0 comments on commit 786beea

Please sign in to comment.