From 6ab74fb76df1501b9aee5ddf513f7ca84a422e26 Mon Sep 17 00:00:00 2001 From: Uruk Date: Sun, 21 Apr 2024 16:31:39 +0200 Subject: [PATCH] Update to .NET 8 - Update .NET to 8.0 - Update .NETFramework to 4.8.1 - Update packages versions - Update MacOS to 12 since earlier version or not supported : https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md - Remove clock and change add to append - OS-release update to Ubuntu 20.04 - Fix task: NodeTool@0 to UseNode@1 - Fix task: reportgenerator@4 to reportgenerator@5 --- azure-pipelines.yml | 80 +++++++++---------- build.sh | 46 +++++------ docs.sh | 2 +- package.json | 2 +- src/Directory.Build.props | 14 ++-- src/Lidarr.Api.V1/Lidarr.Api.V1.csproj | 8 +- .../ApiKeyAuthenticationHandler.cs | 3 +- .../BasicAuthenticationHandler.cs | 8 +- .../Authentication/NoAuthenticationHandler.cs | 5 +- src/Lidarr.Http/Lidarr.Http.csproj | 8 +- .../Middleware/VersionMiddleware.cs | 2 +- src/NzbDrone.Api.Test/Lidarr.Api.Test.csproj | 2 +- .../Lidarr.Automation.Test.csproj | 6 +- .../Lidarr.Common.Test.csproj | 2 +- .../EnvironmentInfo/RuntimeInfo.cs | 2 +- .../Http/Dispatchers/ManagedHttpDispatcher.cs | 2 +- src/NzbDrone.Common/Lidarr.Common.csproj | 22 ++--- src/NzbDrone.Console/Lidarr.Console.csproj | 2 +- .../Lidarr.Core.Test.csproj | 6 +- .../Converters/KeyValuePairConverter.cs | 1 + src/NzbDrone.Core/Lidarr.Core.csproj | 38 ++++----- .../Lidarr.Host.Test.csproj | 2 +- src/NzbDrone.Host/Lidarr.Host.csproj | 6 +- .../Lidarr.Integration.Test.csproj | 4 +- .../Lidarr.Libraries.Test.csproj | 2 +- .../ReleaseFileVersionAdapterFixture.cs | 4 +- .../Files/linux/lsb-release | 6 +- src/NzbDrone.Mono.Test/Files/linux/os-release | 6 +- .../Lidarr.Mono.Test.csproj | 4 +- src/NzbDrone.Mono/Lidarr.Mono.csproj | 8 +- src/NzbDrone.SignalR/Lidarr.SignalR.csproj | 2 +- .../Lidarr.Test.Common.csproj | 18 ++--- src/NzbDrone.Test.Common/NzbDroneRunner.cs | 2 +- .../Lidarr.Test.Dummy.csproj | 2 +- .../Lidarr.Update.Test.csproj | 2 +- src/NzbDrone.Update/Lidarr.Update.csproj | 4 +- .../Lidarr.Windows.Test.csproj | 2 +- src/NzbDrone.Windows/Lidarr.Windows.csproj | 4 +- src/NzbDrone/Lidarr.csproj | 4 +- .../ServiceInstall/ServiceInstall.csproj | 2 +- src/ServiceHelpers/ServiceInstall/app.config | 2 +- .../ServiceUninstall/ServiceUninstall.csproj | 2 +- .../ServiceUninstall/app.config | 2 +- src/Targets/CopyRuntimes.targets | 4 +- src/coverlet.runsettings | 2 +- yarn.lock | 38 +++++---- 46 files changed, 200 insertions(+), 195 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fd06c3f09..48afb8f34 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,12 +15,12 @@ variables: buildName: '$(Build.SourceBranchName).$(lidarrVersion)' sentryOrg: 'servarr' sentryUrl: 'https://sentry.servarr.com' - dotnetVersion: '6.0.417' + dotnetVersion: '8.0.204' nodeVersion: '20.X' innoVersion: '6.2.0' windowsImage: 'windows-2022' linuxImage: 'ubuntu-20.04' - macImage: 'macOS-11' + macImage: 'macOS-12' trigger: branches: @@ -96,7 +96,7 @@ stages: submodules: true fetchDepth: 1 - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - bash: | @@ -122,27 +122,27 @@ stages: artifact: '$(osName)Backend' displayName: Publish Backend condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/win-x64/publish' + - publish: '$(testsFolder)/net8.0/win-x64/publish' artifact: win-x64-tests displayName: Publish win-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/linux-x64/publish' + - publish: '$(testsFolder)/net8.0/linux-x64/publish' artifact: linux-x64-tests displayName: Publish linux-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/linux-x86/publish' + - publish: '$(testsFolder)/net8.0/linux-x86/publish' artifact: linux-x86-tests displayName: Publish linux-x86 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/linux-musl-x64/publish' + - publish: '$(testsFolder)/net8.0/linux-musl-x64/publish' artifact: linux-musl-x64-tests displayName: Publish linux-musl-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/freebsd-x64/publish' + - publish: '$(testsFolder)/net8.0/freebsd-x64/publish' artifact: freebsd-x64-tests displayName: Publish freebsd-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net6.0/osx-x64/publish' + - publish: '$(testsFolder)/net8.0/osx-x64/publish' artifact: osx-x64-tests displayName: Publish osx-x64 Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) @@ -166,10 +166,10 @@ stages: pool: vmImage: $(imageName) steps: - - task: NodeTool@0 + - task: UseNode@1 displayName: Set Node.js version inputs: - versionSpec: $(nodeVersion) + version: $(nodeVersion) - checkout: self submodules: true fetchDepth: 1 @@ -260,21 +260,21 @@ stages: archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).windows-core-x64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/win-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/win-x64/net8.0 - task: ArchiveFiles@2 displayName: Create win-x86 zip inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).windows-core-x86.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/win-x86/net6.0 + rootFolderOrFile: $(artifactsFolder)/win-x86/net8.0 - task: ArchiveFiles@2 displayName: Create osx-x64 app inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-app-core-x64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-x64-app/net8.0 - task: ArchiveFiles@2 displayName: Create osx-x64 tar inputs: @@ -282,14 +282,14 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-x64/net8.0 - task: ArchiveFiles@2 displayName: Create osx-arm64 app inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-app-core-arm64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-arm64-app/net8.0 - task: ArchiveFiles@2 displayName: Create osx-arm64 tar inputs: @@ -297,7 +297,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/osx-arm64/net6.0 + rootFolderOrFile: $(artifactsFolder)/osx-arm64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-x64 tar inputs: @@ -305,7 +305,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-x64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-musl-x64 tar inputs: @@ -313,7 +313,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-x86 tar inputs: @@ -321,7 +321,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-x86/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-x86/net8.0 - task: ArchiveFiles@2 displayName: Create linux-arm tar inputs: @@ -329,7 +329,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-arm/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-arm/net8.0 - task: ArchiveFiles@2 displayName: Create linux-musl-arm tar inputs: @@ -337,7 +337,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-arm/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-arm/net8.0 - task: ArchiveFiles@2 displayName: Create linux-arm64 tar inputs: @@ -345,7 +345,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-arm64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-arm64/net8.0 - task: ArchiveFiles@2 displayName: Create linux-musl-arm64 tar inputs: @@ -353,7 +353,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net6.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net8.0 - task: ArchiveFiles@2 displayName: Create freebsd-x64 tar inputs: @@ -361,7 +361,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/freebsd-x64/net6.0 + rootFolderOrFile: $(artifactsFolder)/freebsd-x64/net8.0 - publish: $(Build.ArtifactStagingDirectory) artifact: 'Packages' displayName: Publish Packages @@ -449,7 +449,7 @@ stages: steps: - checkout: none - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) condition: ne(variables['poolName'], 'FreeBSD') @@ -490,7 +490,7 @@ stages: strategy: matrix: alpine: - testName: 'Musl Net Core' + testName: 'Musl NET Core' artifactName: linux-musl-x64-tests containerImage: ghcr.io/servarr/testimages:alpine linux-x86: @@ -562,7 +562,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: none @@ -619,7 +619,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: none @@ -702,7 +702,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: none @@ -756,7 +756,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: none @@ -819,7 +819,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: none @@ -1012,7 +1012,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: none @@ -1093,10 +1093,10 @@ stages: pool: vmImage: $(imageName) steps: - - task: NodeTool@0 + - task: UseNode@1 displayName: Set Node.js version inputs: - versionSpec: $(nodeVersion) + version: $(nodeVersion) - checkout: self submodules: true fetchDepth: 1 @@ -1149,7 +1149,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: self @@ -1201,7 +1201,7 @@ stages: steps: - task: UseDotNet@2 - displayName: 'Install .net core' + displayName: 'Install .NET core' inputs: version: $(dotnetVersion) - checkout: self # Need history for Sonar analysis @@ -1223,13 +1223,13 @@ stages: sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml - bash: | - ./build.sh --backend -f net6.0 -r win-x64 - TEST_DIR=_tests/net6.0/win-x64/publish/ ./test.sh Windows Unit Coverage + ./build.sh --backend -f net8.0 -r win-x64 + TEST_DIR=_tests/net8.0/win-x64/publish/ ./test.sh Windows Unit Coverage displayName: Coverage Unit Tests - task: SonarCloudAnalyze@1 condition: eq(variables['System.PullRequest.IsFork'], 'False') displayName: Publish SonarCloud Results - - task: reportgenerator@4 + - task: reportgenerator@5 displayName: Generate Coverage Report inputs: reports: '$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml' diff --git a/build.sh b/build.sh index ca2ab01ef..92b8d6355 100755 --- a/build.sh +++ b/build.sh @@ -137,7 +137,7 @@ PackageLinux() echo "Adding Lidarr.Mono to UpdatePackage" cp $folder/Lidarr.Mono.* $folder/Lidarr.Update - if [ "$framework" = "net6.0" ]; then + if [ "$framework" = "net8.0" ]; then cp $folder/Mono.Posix.NETStandard.* $folder/Lidarr.Update cp $folder/libMonoPosixHelper.* $folder/Lidarr.Update fi @@ -165,7 +165,7 @@ PackageMacOS() echo "Adding Lidarr.Mono to UpdatePackage" cp $folder/Lidarr.Mono.* $folder/Lidarr.Update - if [ "$framework" = "net6.0" ]; then + if [ "$framework" = "net8.0" ]; then cp $folder/Mono.Posix.NETStandard.* $folder/Lidarr.Update cp $folder/libMonoPosixHelper.* $folder/Lidarr.Update fi @@ -377,15 +377,15 @@ then Build if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then - PackageTests "net6.0" "win-x64" - PackageTests "net6.0" "win-x86" - PackageTests "net6.0" "linux-x64" - PackageTests "net6.0" "linux-musl-x64" - PackageTests "net6.0" "osx-x64" + PackageTests "net8.0" "win-x64" + PackageTests "net8.0" "win-x86" + PackageTests "net8.0" "linux-x64" + PackageTests "net8.0" "linux-musl-x64" + PackageTests "net8.0" "osx-x64" if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ]; then - PackageTests "net6.0" "freebsd-x64" - PackageTests "net6.0" "linux-x86" + PackageTests "net8.0" "freebsd-x64" + PackageTests "net8.0" "linux-x86" fi else PackageTests "$FRAMEWORK" "$RID" @@ -413,20 +413,20 @@ then if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then - Package "net6.0" "win-x64" - Package "net6.0" "win-x86" - Package "net6.0" "linux-x64" - Package "net6.0" "linux-musl-x64" - Package "net6.0" "linux-arm64" - Package "net6.0" "linux-musl-arm64" - Package "net6.0" "linux-arm" - Package "net6.0" "linux-musl-arm" - Package "net6.0" "osx-x64" - Package "net6.0" "osx-arm64" + Package "net8.0" "win-x64" + Package "net8.0" "win-x86" + Package "net8.0" "linux-x64" + Package "net8.0" "linux-musl-x64" + Package "net8.0" "linux-arm64" + Package "net8.0" "linux-musl-arm64" + Package "net8.0" "linux-arm" + Package "net8.0" "linux-musl-arm" + Package "net8.0" "osx-x64" + Package "net8.0" "osx-arm64" if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ]; then - Package "net6.0" "freebsd-x64" - Package "net6.0" "linux-x86" + Package "net8.0" "freebsd-x64" + Package "net8.0" "linux-x86" fi else Package "$FRAMEWORK" "$RID" @@ -436,7 +436,7 @@ fi if [ "$INSTALLER" = "YES" ]; then InstallInno - BuildInstaller "net6.0" "win-x64" - BuildInstaller "net6.0" "win-x86" + BuildInstaller "net8.0" "win-x64" + BuildInstaller "net8.0" "win-x86" RemoveInno fi diff --git a/docs.sh b/docs.sh index 9cbb02756..02633aaec 100644 --- a/docs.sh +++ b/docs.sh @@ -29,7 +29,7 @@ dotnet msbuild -restore $slnFile -p:Configuration=Debug -p:Platform=$platform -p dotnet new tool-manifest dotnet tool install --version 6.5.0 Swashbuckle.AspNetCore.Cli -dotnet tool run swagger tofile --output ./src/Lidarr.Api.V1/openapi.json "$outputFolder/net6.0/$RUNTIME/lidarr.console.dll" v1 & +dotnet tool run swagger tofile --output ./src/Lidarr.Api.V1/openapi.json "$outputFolder/net8.0/$RUNTIME/lidarr.console.dll" v1 & sleep 45 diff --git a/package.json b/package.json index 48e8e843a..5dc9d5299 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@fortawesome/free-solid-svg-icons": "6.4.0", "@fortawesome/react-fontawesome": "0.2.0", "@juggle/resize-observer": "3.4.0", - "@microsoft/signalr": "6.0.25", + "@microsoft/signalr": "8.0.204", "@sentry/browser": "7.51.2", "@sentry/integrations": "7.51.2", "@types/node": "18.19.31", diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f08a78b98..e6b3c2aca 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ - 6.0-all + 8.0-all true true false @@ -101,14 +101,14 @@ - - - - + + + + - - + + diff --git a/src/Lidarr.Api.V1/Lidarr.Api.V1.csproj b/src/Lidarr.Api.V1/Lidarr.Api.V1.csproj index 7fe0a2d5a..c86238518 100644 --- a/src/Lidarr.Api.V1/Lidarr.Api.V1.csproj +++ b/src/Lidarr.Api.V1/Lidarr.Api.V1.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 @@ -10,9 +10,9 @@ - + - - + + diff --git a/src/Lidarr.Http/Authentication/ApiKeyAuthenticationHandler.cs b/src/Lidarr.Http/Authentication/ApiKeyAuthenticationHandler.cs index 6213a3e9d..c4464a76b 100644 --- a/src/Lidarr.Http/Authentication/ApiKeyAuthenticationHandler.cs +++ b/src/Lidarr.Http/Authentication/ApiKeyAuthenticationHandler.cs @@ -27,9 +27,8 @@ namespace Lidarr.Http.Authentication public ApiKeyAuthenticationHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder, - ISystemClock clock, IConfigFileProvider config) - : base(options, logger, encoder, clock) + : base(options, logger, encoder) { _apiKey = config.ApiKey; } diff --git a/src/Lidarr.Http/Authentication/BasicAuthenticationHandler.cs b/src/Lidarr.Http/Authentication/BasicAuthenticationHandler.cs index 5e2d6502a..96bae5fb0 100644 --- a/src/Lidarr.Http/Authentication/BasicAuthenticationHandler.cs +++ b/src/Lidarr.Http/Authentication/BasicAuthenticationHandler.cs @@ -6,6 +6,7 @@ using System.Text.Encodings.Web; using System.Text.RegularExpressions; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NzbDrone.Common.EnvironmentInfo; @@ -20,9 +21,8 @@ namespace Lidarr.Http.Authentication public BasicAuthenticationHandler(IAuthenticationService authService, IOptionsMonitor options, ILoggerFactory logger, - UrlEncoder encoder, - ISystemClock clock) - : base(options, logger, encoder, clock) + UrlEncoder encoder) + : base(options, logger, encoder) { _authService = authService; } @@ -71,7 +71,7 @@ namespace Lidarr.Http.Authentication protected override Task HandleChallengeAsync(AuthenticationProperties properties) { - Response.Headers.Add("WWW-Authenticate", $"Basic realm=\"{BuildInfo.AppName}\""); + Response.Headers.Append("WWW-Authenticate", $"Basic realm=\"{BuildInfo.AppName}\""); Response.StatusCode = 401; return Task.CompletedTask; } diff --git a/src/Lidarr.Http/Authentication/NoAuthenticationHandler.cs b/src/Lidarr.Http/Authentication/NoAuthenticationHandler.cs index afbf8c717..6991a8062 100644 --- a/src/Lidarr.Http/Authentication/NoAuthenticationHandler.cs +++ b/src/Lidarr.Http/Authentication/NoAuthenticationHandler.cs @@ -13,9 +13,8 @@ namespace Lidarr.Http.Authentication { public NoAuthenticationHandler(IOptionsMonitor options, ILoggerFactory logger, - UrlEncoder encoder, - ISystemClock clock) - : base(options, logger, encoder, clock) + UrlEncoder encoder) + : base(options, logger, encoder) { } diff --git a/src/Lidarr.Http/Lidarr.Http.csproj b/src/Lidarr.Http/Lidarr.Http.csproj index 5f2136f70..2884b859a 100644 --- a/src/Lidarr.Http/Lidarr.Http.csproj +++ b/src/Lidarr.Http/Lidarr.Http.csproj @@ -1,11 +1,11 @@  - net6.0 + net8.0 - - - + + + diff --git a/src/Lidarr.Http/Middleware/VersionMiddleware.cs b/src/Lidarr.Http/Middleware/VersionMiddleware.cs index e99909ed8..27b7986dd 100644 --- a/src/Lidarr.Http/Middleware/VersionMiddleware.cs +++ b/src/Lidarr.Http/Middleware/VersionMiddleware.cs @@ -22,7 +22,7 @@ namespace Lidarr.Http.Middleware { if (context.Request.IsApiRequest() && !context.Response.Headers.ContainsKey(VERSIONHEADER)) { - context.Response.Headers.Add(VERSIONHEADER, _version); + context.Response.Headers.Append(VERSIONHEADER, _version); } await _next(context); diff --git a/src/NzbDrone.Api.Test/Lidarr.Api.Test.csproj b/src/NzbDrone.Api.Test/Lidarr.Api.Test.csproj index c14b36844..38457610c 100644 --- a/src/NzbDrone.Api.Test/Lidarr.Api.Test.csproj +++ b/src/NzbDrone.Api.Test/Lidarr.Api.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Automation.Test/Lidarr.Automation.Test.csproj b/src/NzbDrone.Automation.Test/Lidarr.Automation.Test.csproj index ada550253..bfc5bf1b8 100644 --- a/src/NzbDrone.Automation.Test/Lidarr.Automation.Test.csproj +++ b/src/NzbDrone.Automation.Test/Lidarr.Automation.Test.csproj @@ -1,10 +1,10 @@  - net6.0 + net8.0 - - + + diff --git a/src/NzbDrone.Common.Test/Lidarr.Common.Test.csproj b/src/NzbDrone.Common.Test/Lidarr.Common.Test.csproj index e75403e9f..07487aa58 100644 --- a/src/NzbDrone.Common.Test/Lidarr.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/Lidarr.Common.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index b77e1d229..703cd123f 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Common.EnvironmentInfo IsWindowsService = hostLifetime is WindowsServiceLifetime; IsStarting = true; - // net6.0 will return Lidarr.dll for entry assembly, we need the actual + // net8.0 will return Lidarr.dll for entry assembly, we need the actual // executable name (Lidarr on linux). On mono this will return the location of // the mono executable itself, which is not what we want. var entry = Process.GetCurrentProcess().MainModule; diff --git a/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs b/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs index 8ca01f6ec..5f4a925b3 100644 --- a/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs +++ b/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs @@ -280,7 +280,7 @@ namespace NzbDrone.Common.Http.Dispatchers private async ValueTask onConnect(SocketsHttpConnectionContext context, CancellationToken cancellationToken) { // Until .NET supports an implementation of Happy Eyeballs (https://tools.ietf.org/html/rfc8305#section-2), let's make IPv4 fallback work in a simple way. - // This issue is being tracked at https://github.com/dotnet/runtime/issues/26177 and expected to be fixed in .NET 6. + // This issue is being tracked at https://github.com/dotnet/runtime/issues/26177 and expected to be fixed in .NET 8. if (useIPv6) { try diff --git a/src/NzbDrone.Common/Lidarr.Common.csproj b/src/NzbDrone.Common/Lidarr.Common.csproj index 29e481cfc..f6be47047 100644 --- a/src/NzbDrone.Common/Lidarr.Common.csproj +++ b/src/NzbDrone.Common/Lidarr.Common.csproj @@ -1,24 +1,24 @@  - net6.0 + net8.0 en ISMUSL - + - - - - - - + + + + + + - + - - + + diff --git a/src/NzbDrone.Console/Lidarr.Console.csproj b/src/NzbDrone.Console/Lidarr.Console.csproj index 3d21c1e76..d468f96c6 100644 --- a/src/NzbDrone.Console/Lidarr.Console.csproj +++ b/src/NzbDrone.Console/Lidarr.Console.csproj @@ -1,7 +1,7 @@  Exe - net6.0 + net8.0 ..\NzbDrone.Host\NzbDrone.ico diff --git a/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj b/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj index 6e7bffb4d..45e08f762 100644 --- a/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/Lidarr.Core.Test.csproj @@ -1,11 +1,11 @@  - net6.0 + net8.0 - - + + diff --git a/src/NzbDrone.Core/Datastore/Converters/KeyValuePairConverter.cs b/src/NzbDrone.Core/Datastore/Converters/KeyValuePairConverter.cs index 71017bba1..c12d33e7f 100644 --- a/src/NzbDrone.Core/Datastore/Converters/KeyValuePairConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/KeyValuePairConverter.cs @@ -11,6 +11,7 @@ namespace NzbDrone.Core.Datastore.Converters Based on https://github.com/layomia/dotnet_runtime/blob/master/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/KeyValuePairConverter.cs and https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-converters-how-to */ + need to be removed ? public class KeyValuePairConverter : JsonConverterFactory { diff --git a/src/NzbDrone.Core/Lidarr.Core.csproj b/src/NzbDrone.Core/Lidarr.Core.csproj index e8290ad84..a2dc8242c 100644 --- a/src/NzbDrone.Core/Lidarr.Core.csproj +++ b/src/NzbDrone.Core/Lidarr.Core.csproj @@ -1,31 +1,31 @@  - net6.0 + net8.0 - + - + - - - - - - - - - + + + + + + + + + - - + + - - - - - + + + + + diff --git a/src/NzbDrone.Host.Test/Lidarr.Host.Test.csproj b/src/NzbDrone.Host.Test/Lidarr.Host.Test.csproj index 898d1921c..ae56b51d5 100644 --- a/src/NzbDrone.Host.Test/Lidarr.Host.Test.csproj +++ b/src/NzbDrone.Host.Test/Lidarr.Host.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Host/Lidarr.Host.csproj b/src/NzbDrone.Host/Lidarr.Host.csproj index 9c3f91115..e2b45f8b4 100644 --- a/src/NzbDrone.Host/Lidarr.Host.csproj +++ b/src/NzbDrone.Host/Lidarr.Host.csproj @@ -1,11 +1,11 @@  - net6.0 + net8.0 Library - - + + diff --git a/src/NzbDrone.Integration.Test/Lidarr.Integration.Test.csproj b/src/NzbDrone.Integration.Test/Lidarr.Integration.Test.csproj index de71c3bb0..25905628c 100644 --- a/src/NzbDrone.Integration.Test/Lidarr.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/Lidarr.Integration.Test.csproj @@ -1,10 +1,10 @@  - net6.0 + net8.0 Library - + diff --git a/src/NzbDrone.Libraries.Test/Lidarr.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/Lidarr.Libraries.Test.csproj index fa22205ae..ddbdf92af 100644 --- a/src/NzbDrone.Libraries.Test/Lidarr.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/Lidarr.Libraries.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Mono.Test/EnvironmentInfo/VersionAdapters/ReleaseFileVersionAdapterFixture.cs b/src/NzbDrone.Mono.Test/EnvironmentInfo/VersionAdapters/ReleaseFileVersionAdapterFixture.cs index 20ff6dbeb..3255c8d79 100644 --- a/src/NzbDrone.Mono.Test/EnvironmentInfo/VersionAdapters/ReleaseFileVersionAdapterFixture.cs +++ b/src/NzbDrone.Mono.Test/EnvironmentInfo/VersionAdapters/ReleaseFileVersionAdapterFixture.cs @@ -77,8 +77,8 @@ namespace NzbDrone.Mono.Test.EnvironmentInfo.VersionAdapters var version = Subject.Read(); version.Should().NotBeNull(); version.Name.Should().Be("ubuntu"); - version.Version.Should().Be("14.04"); - version.FullName.Should().Be("Ubuntu 14.04.5 LTS"); + version.Version.Should().Be("20.04"); + version.FullName.Should().Be("Ubuntu 20.04.6 LTS"); } } } diff --git a/src/NzbDrone.Mono.Test/Files/linux/lsb-release b/src/NzbDrone.Mono.Test/Files/linux/lsb-release index 55eb268d5..8f4a95f7d 100644 --- a/src/NzbDrone.Mono.Test/Files/linux/lsb-release +++ b/src/NzbDrone.Mono.Test/Files/linux/lsb-release @@ -1,4 +1,4 @@ DISTRIB_ID=Ubuntu -DISTRIB_RELEASE=14.04 -DISTRIB_CODENAME=trusty -DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS" \ No newline at end of file +DISTRIB_RELEASE=20.04 +DISTRIB_CODENAME=focal +DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS" \ No newline at end of file diff --git a/src/NzbDrone.Mono.Test/Files/linux/os-release b/src/NzbDrone.Mono.Test/Files/linux/os-release index 724f6a79f..43710f71d 100644 --- a/src/NzbDrone.Mono.Test/Files/linux/os-release +++ b/src/NzbDrone.Mono.Test/Files/linux/os-release @@ -1,9 +1,9 @@ NAME="Ubuntu" -VERSION="14.04.5 LTS, Trusty Tahr" +VERSION="20.04.6 LTS, Focal Fossa" ID=ubuntu ID_LIKE=debian -PRETTY_NAME="Ubuntu 14.04.5 LTS" -VERSION_ID="14.04" +PRETTY_NAME="Ubuntu 20.04.6 LTS" +VERSION_ID="20.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" \ No newline at end of file diff --git a/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj b/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj index 913473a70..65d424627 100644 --- a/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/Lidarr.Mono.Test.csproj @@ -1,9 +1,9 @@  - net6.0 + net8.0 - + diff --git a/src/NzbDrone.Mono/Lidarr.Mono.csproj b/src/NzbDrone.Mono/Lidarr.Mono.csproj index b9b88b769..e6b244d73 100644 --- a/src/NzbDrone.Mono/Lidarr.Mono.csproj +++ b/src/NzbDrone.Mono/Lidarr.Mono.csproj @@ -1,12 +1,12 @@  - net6.0 + net8.0 true - - - + + + diff --git a/src/NzbDrone.SignalR/Lidarr.SignalR.csproj b/src/NzbDrone.SignalR/Lidarr.SignalR.csproj index 6d33ae4ae..35b17d971 100644 --- a/src/NzbDrone.SignalR/Lidarr.SignalR.csproj +++ b/src/NzbDrone.SignalR/Lidarr.SignalR.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 Library diff --git a/src/NzbDrone.Test.Common/Lidarr.Test.Common.csproj b/src/NzbDrone.Test.Common/Lidarr.Test.Common.csproj index 4d2832ec8..ac59bcd9d 100644 --- a/src/NzbDrone.Test.Common/Lidarr.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/Lidarr.Test.Common.csproj @@ -1,17 +1,17 @@  - net6.0 + net8.0 - - - - - - + + + + + + - - + + diff --git a/src/NzbDrone.Test.Common/NzbDroneRunner.cs b/src/NzbDrone.Test.Common/NzbDroneRunner.cs index a956dff33..18c64d2ed 100644 --- a/src/NzbDrone.Test.Common/NzbDroneRunner.cs +++ b/src/NzbDrone.Test.Common/NzbDroneRunner.cs @@ -58,7 +58,7 @@ namespace NzbDrone.Test.Common _startupLog = new List(); if (BuildInfo.IsDebug) { - Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "_output", "net6.0", lidarrConsoleExe)); + Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "_output", "net8.0", lidarrConsoleExe)); } else { diff --git a/src/NzbDrone.Test.Dummy/Lidarr.Test.Dummy.csproj b/src/NzbDrone.Test.Dummy/Lidarr.Test.Dummy.csproj index 8069c5a84..06ff2e92f 100644 --- a/src/NzbDrone.Test.Dummy/Lidarr.Test.Dummy.csproj +++ b/src/NzbDrone.Test.Dummy/Lidarr.Test.Dummy.csproj @@ -1,6 +1,6 @@  Exe - net6.0 + net8.0 diff --git a/src/NzbDrone.Update.Test/Lidarr.Update.Test.csproj b/src/NzbDrone.Update.Test/Lidarr.Update.Test.csproj index 0a48b3fbe..3e5a4d7a2 100644 --- a/src/NzbDrone.Update.Test/Lidarr.Update.Test.csproj +++ b/src/NzbDrone.Update.Test/Lidarr.Update.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Update/Lidarr.Update.csproj b/src/NzbDrone.Update/Lidarr.Update.csproj index 9cc456585..09f4fa0ae 100644 --- a/src/NzbDrone.Update/Lidarr.Update.csproj +++ b/src/NzbDrone.Update/Lidarr.Update.csproj @@ -1,12 +1,12 @@  WinExe - net6.0 + net8.0 - + diff --git a/src/NzbDrone.Windows.Test/Lidarr.Windows.Test.csproj b/src/NzbDrone.Windows.Test/Lidarr.Windows.Test.csproj index 4f27853e7..12d430246 100644 --- a/src/NzbDrone.Windows.Test/Lidarr.Windows.Test.csproj +++ b/src/NzbDrone.Windows.Test/Lidarr.Windows.Test.csproj @@ -1,6 +1,6 @@  - net6.0 + net8.0 diff --git a/src/NzbDrone.Windows/Lidarr.Windows.csproj b/src/NzbDrone.Windows/Lidarr.Windows.csproj index 6eeee23d4..f30a7bbe7 100644 --- a/src/NzbDrone.Windows/Lidarr.Windows.csproj +++ b/src/NzbDrone.Windows/Lidarr.Windows.csproj @@ -1,10 +1,10 @@  - net6.0 + net8.0 true - + diff --git a/src/NzbDrone/Lidarr.csproj b/src/NzbDrone/Lidarr.csproj index 1c2a37522..29d30ee9c 100644 --- a/src/NzbDrone/Lidarr.csproj +++ b/src/NzbDrone/Lidarr.csproj @@ -1,14 +1,14 @@  WinExe - net6.0-windows + net8.0-windows win-x64;win-x86 true ..\NzbDrone.Host\NzbDrone.ico true - + diff --git a/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj b/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj index 21e3125e0..79a732c2f 100644 --- a/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj +++ b/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj @@ -1,7 +1,7 @@  WinExe - net6.0 + net8.0 diff --git a/src/ServiceHelpers/ServiceInstall/app.config b/src/ServiceHelpers/ServiceInstall/app.config index d0244c521..52652c147 100644 --- a/src/ServiceHelpers/ServiceInstall/app.config +++ b/src/ServiceHelpers/ServiceInstall/app.config @@ -1,6 +1,6 @@ - + diff --git a/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj b/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj index 21e3125e0..79a732c2f 100644 --- a/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj +++ b/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj @@ -1,7 +1,7 @@  WinExe - net6.0 + net8.0 diff --git a/src/ServiceHelpers/ServiceUninstall/app.config b/src/ServiceHelpers/ServiceUninstall/app.config index d0244c521..52652c147 100644 --- a/src/ServiceHelpers/ServiceUninstall/app.config +++ b/src/ServiceHelpers/ServiceUninstall/app.config @@ -1,6 +1,6 @@ - + diff --git a/src/Targets/CopyRuntimes.targets b/src/Targets/CopyRuntimes.targets index 2479a6fbc..3b86b1e87 100644 --- a/src/Targets/CopyRuntimes.targets +++ b/src/Targets/CopyRuntimes.targets @@ -2,10 +2,10 @@ - + - + diff --git a/src/coverlet.runsettings b/src/coverlet.runsettings index 406fac63d..6af9ca12e 100644 --- a/src/coverlet.runsettings +++ b/src/coverlet.runsettings @@ -12,7 +12,7 @@ - diff --git a/yarn.lock b/yarn.lock index fda5bca42..f959edb96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1224,14 +1224,14 @@ resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60" integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA== -"@microsoft/signalr@6.0.25": - version "6.0.25" - resolved "https://registry.yarnpkg.com/@microsoft/signalr/-/signalr-6.0.25.tgz#009f043066d383e2de41a483bd7e02bfd74d3cf8" - integrity sha512-8AzrpxS+E0yn1tXSlv7+UlURLmSxTQDgbvOT0pGKXjZT7MkhnDP+/GLuk7veRtUjczou/x32d9PHhYlr2NBy6Q== +"@microsoft/signalr@8.0.204": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@microsoft/signalr/-/signalr-8.0.0.tgz#cb1412e88e0527f40da9178fefc27a65c3ddeab0" + integrity sha512-K/wS/VmzRWePCGqGh8MU8OWbS1Zvu7DG7LSJS62fBB8rJUXwwj4axQtqrAAwKGUZHQF6CuteuQR9xMsVpM2JNA== dependencies: abort-controller "^3.0.0" - eventsource "^1.0.7" - fetch-cookie "^0.11.0" + eventsource "^2.0.2" + fetch-cookie "^2.0.3" node-fetch "^2.6.7" ws "^7.4.5" @@ -3358,10 +3358,10 @@ events@^3.2.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -eventsource@^1.0.7: - version "1.1.2" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.2.tgz#bc75ae1c60209e7cb1541231980460343eaea7c2" - integrity sha512-xAH3zWhgO2/3KIniEKYPr8plNSzlGINOUqYj0m0u7AB81iRw8b/3E73W6AuU+6klLbaSFmZnaETQ2lXPfAydrA== +eventsource@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-2.0.2.tgz#76dfcc02930fb2ff339520b6d290da573a9e8508" + integrity sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA== extend-shallow@^1.1.2: version "1.1.4" @@ -3430,12 +3430,13 @@ faye-websocket@~0.10.0: dependencies: websocket-driver ">=0.5.1" -fetch-cookie@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.11.0.tgz#e046d2abadd0ded5804ce7e2cae06d4331c15407" - integrity sha512-BQm7iZLFhMWFy5CZ/162sAGjBfdNWb7a8LEqqnzsHFhxT/X/SVj/z2t2nu3aJvjlbQkrAlTUApplPRjWyH4mhA== +fetch-cookie@^2.0.3: + version "2.2.0" + resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-2.2.0.tgz#01086b6b5b1c3e08f15ffd8647b02ca100377365" + integrity sha512-h9AgfjURuCgA2+2ISl8GbavpUdR+WGAM2McW/ovn4tVccegp8ZqCKWSBR8uRdM8dDNlx5WdKRWxBYUwteLDCNQ== dependencies: - tough-cookie "^2.3.3 || ^3.0.1 || ^4.0.0" + set-cookie-parser "^2.4.8" + tough-cookie "^4.0.0" file-entry-cache@^6.0.1: version "6.0.1" @@ -6245,6 +6246,11 @@ serialize-javascript@^6.0.1: dependencies: randombytes "^2.1.0" +set-cookie-parser@^2.4.8: + version "2.6.0" + resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz#131921e50f62ff1a66a461d7d62d7b21d5d15a51" + integrity sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ== + set-function-length@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" @@ -6779,7 +6785,7 @@ to-space-case@^1.0.0: dependencies: to-no-case "^1.0.0" -"tough-cookie@^2.3.3 || ^3.0.1 || ^4.0.0": +tough-cookie@^4.0.0: version "4.1.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==