Skip to content

Commit 2bff224

Browse files
committed
add .net8 support
1 parent 78cc5a7 commit 2bff224

11 files changed

Lines changed: 50 additions & 7 deletions

File tree

‎.github/workflows/cicd.yaml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ jobs:
1818
dotnet-version: "6.x"
1919
- uses: actions/setup-dotnet@v3
2020
with:
21-
dotnet-version: "7.0.203"
21+
dotnet-version: "7.x"
22+
- uses: actions/setup-dotnet@v3
23+
with:
24+
dotnet-version: "8.x"
2225
- name: Set RELEASE_VERSION
2326
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2427
- name: Restore Packages
@@ -54,23 +57,27 @@ jobs:
5457
zip -j SpotifyAPI.Web-net5.0.zip SpotifyAPI.Web/bin/Release/net5.0/*
5558
zip -j SpotifyAPI.Web-net6.0.zip SpotifyAPI.Web/bin/Release/net6.0/*
5659
zip -j SpotifyAPI.Web-net7.0.zip SpotifyAPI.Web/bin/Release/net7.0/*
60+
zip -j SpotifyAPI.Web-net8.0.zip SpotifyAPI.Web/bin/Release/net8.0/*
5761
5862
zip -j SpotifyAPI.Web.Auth-netstandard2.0.zip SpotifyAPI.Web.Auth/bin/Release/netstandard2.0/*
5963
zip -j SpotifyAPI.Web.Auth-netstandard2.1.zip SpotifyAPI.Web.Auth/bin/Release/netstandard2.1/*
6064
zip -j SpotifyAPI.Web.Auth-net5.0.zip SpotifyAPI.Web.Auth/bin/Release/net5.0/*
6165
zip -j SpotifyAPI.Web.Auth-net6.0.zip SpotifyAPI.Web.Auth/bin/Release/net6.0/*
6266
zip -j SpotifyAPI.Web.Auth-net7.0.zip SpotifyAPI.Web.Auth/bin/Release/net7.0/*
67+
zip -j SpotifyAPI.Web.Auth-net8.0.zip SpotifyAPI.Web.Auth/bin/Release/net8.0/*
6368
6469
gh release upload "$RELEASE_VERSION" \
6570
"SpotifyAPI.Web-netstandard2.0.zip" \
6671
"SpotifyAPI.Web-netstandard2.1.zip" \
6772
"SpotifyAPI.Web-net5.0.zip" \
6873
"SpotifyAPI.Web-net6.0.zip" \
6974
"SpotifyAPI.Web-net7.0.zip" \
75+
"SpotifyAPI.Web-net8.0.zip" \
7076
"SpotifyAPI.Web.Auth-netstandard2.0.zip" \
7177
"SpotifyAPI.Web.Auth-netstandard2.1.zip" \
7278
"SpotifyAPI.Web.Auth-net5.0.zip" \
7379
"SpotifyAPI.Web.Auth-net6.0.zip" \
7480
"SpotifyAPI.Web.Auth-net7.0.zip"
81+
"SpotifyAPI.Web.Auth-net8.0.zip"
7582
env:
7683
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎SpotifyAPI.Web.Auth/SpotifyAPI.Web.Auth.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net7.0;net6.0;net5.0;netstandard2.1;netstandard2.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netstandard2.1;netstandard2.0</TargetFrameworks>
44
<LangVersion>9.0</LangVersion>
55
<Nullable>enable</Nullable>
66
<PackageId>SpotifyAPI.Web.Auth</PackageId>

‎SpotifyAPI.Web.Tests/SpotifyAPI.Web.Tests.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
55
<LangVersion>9.0</LangVersion>
66
<IsPackable>false</IsPackable>
77
<CheckEolTargetFramework>false</CheckEolTargetFramework>

‎SpotifyAPI.Web/Exceptions/APIException.cs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public APIException(string message, Exception innerException) : base(message, in
3030
{
3131
}
3232

33+
#if NET8_0_OR_GREATER
34+
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.")]
35+
#endif
3336
protected APIException(SerializationInfo info, StreamingContext context) : base(info, context)
3437
{
3538
Response = info.GetValue("APIException.Response", typeof(IResponse)) as IResponse;
@@ -67,6 +70,11 @@ protected APIException(SerializationInfo info, StreamingContext context) : base(
6770
return null;
6871
}
6972

73+
74+
75+
#if NET8_0_OR_GREATER
76+
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.")]
77+
#endif
7078
public override void GetObjectData(SerializationInfo info, StreamingContext context)
7179
{
7280
base.GetObjectData(info, context);

‎SpotifyAPI.Web/Exceptions/APIPagingException.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public APIPagingException(string message) : base(message) { }
2626

2727
public APIPagingException(string message, Exception innerException) : base(message, innerException) { }
2828

29+
#if NET8_0_OR_GREATER
30+
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.")]
31+
#endif
2932
protected APIPagingException(SerializationInfo info, StreamingContext context) : base(info, context) { }
3033
}
3134
}

‎SpotifyAPI.Web/Exceptions/APITooManyRequestsException.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public APITooManyRequestsException(string message) : base(message) { }
2626

2727
public APITooManyRequestsException(string message, Exception innerException) : base(message, innerException) { }
2828

29+
#if NET8_0_OR_GREATER
30+
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.")]
31+
#endif
2932
protected APITooManyRequestsException(SerializationInfo info, StreamingContext context) : base(info, context) { }
3033
}
3134
}

‎SpotifyAPI.Web/Exceptions/APIUnauthorizedException.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public APIUnauthorizedException(string message) : base(message) { }
1515

1616
public APIUnauthorizedException(string message, Exception innerException) : base(message, innerException) { }
1717

18+
#if NET8_0_OR_GREATER
19+
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.")]
20+
#endif
1821
protected APIUnauthorizedException(SerializationInfo info, StreamingContext context) : base(info, context) { }
1922
}
2023
}

‎SpotifyAPI.Web/Http/APIConnector.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void SetRequestTimeout(TimeSpan timeout)
166166
_httpClient.SetRequestTimeout(timeout);
167167
}
168168

169-
private IRequest CreateRequest(
169+
private Request CreateRequest(
170170
Uri uri,
171171
HttpMethod method,
172172
IDictionary<string, string>? parameters,

‎SpotifyAPI.Web/Http/NetHttpClient.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void SetRequestTimeout(TimeSpan timeout)
112112
_httpClient.Timeout = timeout;
113113
}
114114

115-
private static HttpMessageHandler CreateMessageHandler(IProxyConfig proxyConfig)
115+
private static HttpClientHandler CreateMessageHandler(IProxyConfig proxyConfig)
116116
{
117117
var proxy = new WebProxy
118118
{

‎SpotifyAPI.Web/SpotifyAPI.Web.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0;net6.0;net5.0;netstandard2.1;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netstandard2.1;netstandard2.0</TargetFrameworks>
55
<LangVersion>9.0</LangVersion>
66
<Nullable>enable</Nullable>
77
<PackageId>SpotifyAPI.Web</PackageId>

0 commit comments

Comments
 (0)