From 3c9ed360063f7657ca5fb45c67f8cf4d7e027f54 Mon Sep 17 00:00:00 2001 From: danielvschoor Date: Wed, 17 Jul 2024 22:48:16 +0200 Subject: [PATCH] feat: Upgrade to .net 8 and remove obsolete method calls --- build.sh | 2 +- docs.sh | 2 +- global.json | 2 +- src/Directory.Build.props | 2 +- src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj | 2 +- src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj | 2 +- src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj | 2 +- .../Disk/DestinationAlreadyExistsException.cs | 6 ------ src/NzbDrone.Common/Sonarr.Common.csproj | 2 +- src/NzbDrone.Console/Sonarr.Console.csproj | 3 ++- src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj | 2 +- .../MediaFiles/EpisodeImport/RecycleBinException.cs | 6 ------ .../EpisodeImport/RootFolderNotFoundException.cs | 6 ------ src/NzbDrone.Core/Sonarr.Core.csproj | 2 +- src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj | 2 +- src/NzbDrone.Host/Sonarr.Host.csproj | 2 +- .../Sonarr.Integration.Test.csproj | 2 +- src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj | 2 +- src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj | 2 +- src/NzbDrone.Mono/Sonarr.Mono.csproj | 2 +- src/NzbDrone.SignalR/Sonarr.SignalR.csproj | 2 +- src/NzbDrone.Test.Common/NzbDroneRunner.cs | 2 +- src/NzbDrone.Test.Common/Sonarr.Test.Common.csproj | 2 +- src/NzbDrone.Test.Dummy/Sonarr.Test.Dummy.csproj | 2 +- src/NzbDrone.Update.Test/Sonarr.Update.Test.csproj | 2 +- src/NzbDrone.Update/Sonarr.Update.csproj | 2 +- src/NzbDrone.Windows.Test/Sonarr.Windows.Test.csproj | 2 +- src/NzbDrone.Windows/Sonarr.Windows.csproj | 2 +- src/NzbDrone/Sonarr.csproj | 2 +- src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj | 2 +- .../ServiceUninstall/ServiceUninstall.csproj | 2 +- src/Sonarr.Api.V3/Sonarr.Api.V3.csproj | 2 +- .../Authentication/ApiKeyAuthenticationHandler.cs | 3 +-- .../Authentication/BasicAuthenticationHandler.cs | 7 +++---- src/Sonarr.Http/Authentication/NoAuthenticationHandler.cs | 5 ++--- src/Sonarr.Http/Middleware/VersionMiddleware.cs | 2 +- src/Sonarr.Http/REST/RestController.cs | 2 +- src/Sonarr.Http/Sonarr.Http.csproj | 2 +- src/Sonarr.RuntimePatches/Sonarr.RuntimePatches.csproj | 2 +- 39 files changed, 40 insertions(+), 60 deletions(-) diff --git a/build.sh b/build.sh index ee59d2f61..44e86f8f2 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ set -e outputFolder='_output' testPackageFolder='_tests' artifactsFolder="_artifacts"; -framework="${FRAMEWORK:=net6.0}" +framework="${FRAMEWORK:=net8.0}" ProgressStart() { diff --git a/docs.sh b/docs.sh index 386f5df68..0f3733f4e 100755 --- a/docs.sh +++ b/docs.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -FRAMEWORK="net6.0" +FRAMEWORK="net8.0" PLATFORM=$1 if [ "$PLATFORM" = "Windows" ]; then diff --git a/global.json b/global.json index 5f5ece165..fd07d882a 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "6.0.405" + "version": "8.0.303" } } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 239a98d73..375c71716 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -135,7 +135,7 @@ - + diff --git a/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj b/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj index 053b42cc9..a376886f6 100644 --- a/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj +++ b/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj b/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj index 9cf833789..23250be70 100644 --- a/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj +++ b/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj b/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj index 402cae2bf..1a553cf8e 100644 --- a/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs b/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs index ffdc36e0e..d96bb22e9 100644 --- a/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs +++ b/src/NzbDrone.Common/Disk/DestinationAlreadyExistsException.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Runtime.Serialization; namespace NzbDrone.Common.Disk { @@ -24,10 +23,5 @@ namespace NzbDrone.Common.Disk : base(message, innerException) { } - - protected DestinationAlreadyExistsException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } } diff --git a/src/NzbDrone.Common/Sonarr.Common.csproj b/src/NzbDrone.Common/Sonarr.Common.csproj index afd914994..7f4f73f98 100644 --- a/src/NzbDrone.Common/Sonarr.Common.csproj +++ b/src/NzbDrone.Common/Sonarr.Common.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 ISMUSL diff --git a/src/NzbDrone.Console/Sonarr.Console.csproj b/src/NzbDrone.Console/Sonarr.Console.csproj index aef81527d..e1c0ae15a 100644 --- a/src/NzbDrone.Console/Sonarr.Console.csproj +++ b/src/NzbDrone.Console/Sonarr.Console.csproj @@ -1,9 +1,10 @@  Exe - net6.0 ..\NzbDrone.Host\Sonarr.ico + + net8.0 Sonarr diff --git a/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj b/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj index 6a1477da4..98d2dab7a 100644 --- a/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/RecycleBinException.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/RecycleBinException.cs index 645951518..9586d0e63 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/RecycleBinException.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/RecycleBinException.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Runtime.Serialization; namespace NzbDrone.Core.MediaFiles.EpisodeImport { @@ -19,10 +18,5 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport : base(message, innerException) { } - - protected RecycleBinException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } } diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/RootFolderNotFoundException.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/RootFolderNotFoundException.cs index 9690a4028..07aebc9bc 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/RootFolderNotFoundException.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/RootFolderNotFoundException.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Runtime.Serialization; namespace NzbDrone.Core.MediaFiles.EpisodeImport { @@ -19,10 +18,5 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport : base(message, innerException) { } - - protected RootFolderNotFoundException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } } diff --git a/src/NzbDrone.Core/Sonarr.Core.csproj b/src/NzbDrone.Core/Sonarr.Core.csproj index e66e1483c..badf9ae9d 100644 --- a/src/NzbDrone.Core/Sonarr.Core.csproj +++ b/src/NzbDrone.Core/Sonarr.Core.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 diff --git a/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj b/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj index 00783be18..e62f81ff1 100644 --- a/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj +++ b/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Host/Sonarr.Host.csproj b/src/NzbDrone.Host/Sonarr.Host.csproj index 7eb3a4058..3c2e84fb5 100644 --- a/src/NzbDrone.Host/Sonarr.Host.csproj +++ b/src/NzbDrone.Host/Sonarr.Host.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 Library diff --git a/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj b/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj index b78253880..96763f26f 100644 --- a/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 Library diff --git a/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj index 511c54cba..b2f6c3002 100644 --- a/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj b/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj index 60c6f901c..6f067e499 100644 --- a/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0