Browse Source

Update projects to .NET 9 (#13023)

Bond-009 6 months ago
parent
commit
ceb850c770
51 changed files with 63 additions and 69 deletions
  1. 3 3
      .devcontainer/Dev - Server Ffmpeg/devcontainer.json
  2. 3 3
      .devcontainer/devcontainer.json
  3. 1 1
      .github/workflows/ci-codeql-analysis.yml
  4. 4 4
      .github/workflows/ci-openapi.yml
  5. 1 1
      .github/workflows/ci-tests.yml
  6. 3 3
      .vscode/launch.json
  7. 1 0
      Directory.Build.props
  8. 1 1
      Emby.Naming/Emby.Naming.csproj
  9. 1 1
      Emby.Photos/Emby.Photos.csproj
  10. 1 1
      Emby.Server.Implementations/ApplicationHost.cs
  11. 1 1
      Emby.Server.Implementations/Emby.Server.Implementations.csproj
  12. 0 1
      Emby.Server.Implementations/Library/UserDataManager.cs
  13. 1 1
      Emby.Server.Implementations/Plugins/PluginManager.cs
  14. 1 1
      Jellyfin.Api/Controllers/ItemUpdateController.cs
  15. 1 1
      Jellyfin.Api/Jellyfin.Api.csproj
  16. 1 1
      Jellyfin.Data/Entities/User.cs
  17. 1 1
      Jellyfin.Data/Jellyfin.Data.csproj
  18. 1 1
      Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj
  19. 0 8
      Jellyfin.Server/Helpers/StartupHelpers.cs
  20. 1 1
      Jellyfin.Server/Jellyfin.Server.csproj
  21. 1 1
      MediaBrowser.Common/MediaBrowser.Common.csproj
  22. 1 1
      MediaBrowser.Common/Plugins/BasePluginOfT.cs
  23. 1 1
      MediaBrowser.Controller/MediaBrowser.Controller.csproj
  24. 1 1
      MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj
  25. 1 1
      MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj
  26. 1 1
      MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
  27. 2 2
      MediaBrowser.Model/MediaBrowser.Model.csproj
  28. 1 2
      MediaBrowser.Providers/Manager/ProviderManager.cs
  29. 1 1
      MediaBrowser.Providers/MediaBrowser.Providers.csproj
  30. 1 1
      MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj
  31. 2 2
      README.md
  32. 1 1
      fuzz/Emby.Server.Implementations.Fuzz/Emby.Server.Implementations.Fuzz.csproj
  33. 1 1
      fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh
  34. 1 1
      fuzz/Jellyfin.Api.Fuzz/Jellyfin.Api.Fuzz.csproj
  35. 1 1
      fuzz/Jellyfin.Api.Fuzz/fuzz.sh
  36. 1 1
      global.json
  37. 4 0
      jellyfin.ruleset
  38. 1 1
      src/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj
  39. 1 1
      src/Jellyfin.Drawing/Jellyfin.Drawing.csproj
  40. 1 1
      src/Jellyfin.Extensions/Jellyfin.Extensions.csproj
  41. 0 1
      src/Jellyfin.Extensions/Json/Converters/JsonDelimitedArrayConverter.cs
  42. 1 1
      src/Jellyfin.LiveTv/Jellyfin.LiveTv.csproj
  43. 1 1
      src/Jellyfin.MediaEncoding.Hls/Jellyfin.MediaEncoding.Hls.csproj
  44. 1 1
      src/Jellyfin.MediaEncoding.Keyframes/Jellyfin.MediaEncoding.Keyframes.csproj
  45. 1 1
      src/Jellyfin.Networking/Jellyfin.Networking.csproj
  46. 1 1
      src/Jellyfin.Networking/Manager/NetworkManager.cs
  47. 1 1
      tests/Directory.Build.props
  48. 1 1
      tests/Jellyfin.Extensions.Tests/Json/Models/GenericBodyArrayModel.cs
  49. 1 1
      tests/Jellyfin.Extensions.Tests/Json/Models/GenericBodyIReadOnlyListModel.cs
  50. 2 2
      tests/Jellyfin.LiveTv.Tests/Jellyfin.LiveTv.Tests.csproj
  51. 1 1
      tests/Jellyfin.Server.Implementations.Tests/TypedBaseItem/BaseItemKindTests.cs

+ 3 - 3
.devcontainer/Dev - Server Ffmpeg/devcontainer.json

@@ -1,6 +1,6 @@
 {
     "name": "Development Jellyfin Server - FFmpeg",
-    "image":"mcr.microsoft.com/devcontainers/dotnet:8.0-jammy",
+    "image":"mcr.microsoft.com/devcontainers/dotnet:9.0-jammy",
     // restores nuget packages, installs the dotnet workloads and installs the dev https certificate
     "postStartCommand": "dotnet restore; dotnet workload update; dotnet dev-certs https --trust; sudo bash \"./.devcontainer/Dev - Server Ffmpeg/install-ffmpeg.sh\"",
     // reads the extensions list and installs them
@@ -8,8 +8,8 @@
     "features": {
         "ghcr.io/devcontainers/features/dotnet:2": {
             "version": "none",
-            "dotnetRuntimeVersions": "8.0",
-            "aspNetCoreRuntimeVersions": "8.0"
+            "dotnetRuntimeVersions": "9.0",
+            "aspNetCoreRuntimeVersions": "9.0"
         },
         "ghcr.io/devcontainers-contrib/features/apt-packages:1": {
             "preserve_apt_list": false,

+ 3 - 3
.devcontainer/devcontainer.json

@@ -1,6 +1,6 @@
 {
     "name": "Development Jellyfin Server",
-    "image":"mcr.microsoft.com/devcontainers/dotnet:8.0-jammy",
+    "image":"mcr.microsoft.com/devcontainers/dotnet:9.0-jammy",
     // restores nuget packages, installs the dotnet workloads and installs the dev https certificate
     "postStartCommand": "dotnet restore; dotnet workload update; dotnet dev-certs https --trust",
     // reads the extensions list and installs them
@@ -8,8 +8,8 @@
     "features": {
         "ghcr.io/devcontainers/features/dotnet:2": {
             "version": "none",
-            "dotnetRuntimeVersions": "8.0",
-            "aspNetCoreRuntimeVersions": "8.0"
+            "dotnetRuntimeVersions": "9.0",
+            "aspNetCoreRuntimeVersions": "9.0"
         },
         "ghcr.io/devcontainers-contrib/features/apt-packages:1": {
             "preserve_apt_list": false,

+ 1 - 1
.github/workflows/ci-codeql-analysis.yml

@@ -24,7 +24,7 @@ jobs:
     - name: Setup .NET
       uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
       with:
-        dotnet-version: '8.0.x'
+        dotnet-version: '9.0.x'
 
     - name: Initialize CodeQL
       uses: github/codeql-action/init@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4

+ 4 - 4
.github/workflows/ci-openapi.yml

@@ -23,7 +23,7 @@ jobs:
       - name: Setup .NET
         uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
         with:
-          dotnet-version: '8.0.x'
+          dotnet-version: '9.0.x'
       - name: Generate openapi.json
         run: dotnet test tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj -c Release --filter "Jellyfin.Server.Integration.Tests.OpenApiSpecTests"
       - name: Upload openapi.json
@@ -32,7 +32,7 @@ jobs:
           name: openapi-head
           retention-days: 14
           if-no-files-found: error
-          path: tests/Jellyfin.Server.Integration.Tests/bin/Release/net8.0/openapi.json
+          path: tests/Jellyfin.Server.Integration.Tests/bin/Release/net9.0/openapi.json
 
   openapi-base:
     name: OpenAPI - BASE
@@ -57,7 +57,7 @@ jobs:
       - name: Setup .NET
         uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
         with:
-          dotnet-version: '8.0.x'
+          dotnet-version: '9.0.x'
       - name: Generate openapi.json
         run: dotnet test tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj -c Release --filter "Jellyfin.Server.Integration.Tests.OpenApiSpecTests"
       - name: Upload openapi.json
@@ -66,7 +66,7 @@ jobs:
           name: openapi-base
           retention-days: 14
           if-no-files-found: error
-          path: tests/Jellyfin.Server.Integration.Tests/bin/Release/net8.0/openapi.json
+          path: tests/Jellyfin.Server.Integration.Tests/bin/Release/net9.0/openapi.json
 
   openapi-diff:
     permissions:

+ 1 - 1
.github/workflows/ci-tests.yml

@@ -9,7 +9,7 @@ on:
   pull_request:
 
 env:
-  SDK_VERSION: "8.0.x"
+  SDK_VERSION: "9.0.x"
 
 jobs:
   run-tests:

+ 3 - 3
.vscode/launch.json

@@ -6,7 +6,7 @@
             "type": "coreclr",
             "request": "launch",
             "preLaunchTask": "build",
-            "program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/net8.0/jellyfin.dll",
+            "program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/net9.0/jellyfin.dll",
             "args": [],
             "cwd": "${workspaceFolder}/Jellyfin.Server",
             "console": "internalConsole",
@@ -22,7 +22,7 @@
             "type": "coreclr",
             "request": "launch",
             "preLaunchTask": "build",
-            "program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/net8.0/jellyfin.dll",
+            "program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/net9.0/jellyfin.dll",
             "args": ["--nowebclient"],
             "cwd": "${workspaceFolder}/Jellyfin.Server",
             "console": "internalConsole",
@@ -34,7 +34,7 @@
             "type": "coreclr",
             "request": "launch",
             "preLaunchTask": "build",
-            "program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/net8.0/jellyfin.dll",
+            "program": "${workspaceFolder}/Jellyfin.Server/bin/Debug/net9.0/jellyfin.dll",
             "args": ["--nowebclient", "--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"],
             "cwd": "${workspaceFolder}/Jellyfin.Server",
             "console": "internalConsole",

+ 1 - 0
Directory.Build.props

@@ -8,6 +8,7 @@
 
   <PropertyGroup>
     <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+    <WarningsNotAsErrors>NU1902;NU1903</WarningsNotAsErrors>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

+ 1 - 1
Emby.Naming/Emby.Naming.csproj

@@ -6,7 +6,7 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>

+ 1 - 1
Emby.Photos/Emby.Photos.csproj

@@ -19,7 +19,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 1 - 1
Emby.Server.Implementations/ApplicationHost.cs

@@ -607,7 +607,7 @@ namespace Emby.Server.Implementations
                 // Don't use an empty string password
                 password = string.IsNullOrWhiteSpace(password) ? null : password;
 
-                var localCert = new X509Certificate2(path, password, X509KeyStorageFlags.UserKeySet);
+                var localCert = X509CertificateLoader.LoadPkcs12FromFile(path, password, X509KeyStorageFlags.UserKeySet);
                 if (!localCert.HasPrivateKey)
                 {
                     Logger.LogError("No private key included in SSL cert {CertificateLocation}.", path);

+ 1 - 1
Emby.Server.Implementations/Emby.Server.Implementations.csproj

@@ -37,7 +37,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 0 - 1
Emby.Server.Implementations/Library/UserDataManager.cs

@@ -84,7 +84,6 @@ namespace Emby.Server.Implementations.Library
         {
             ArgumentNullException.ThrowIfNull(user);
             ArgumentNullException.ThrowIfNull(item);
-            ArgumentNullException.ThrowIfNull(reason);
             ArgumentNullException.ThrowIfNull(userDataDto);
 
             var userData = GetUserData(user, item);

+ 1 - 1
Emby.Server.Implementations/Plugins/PluginManager.cs

@@ -835,7 +835,7 @@ namespace Emby.Server.Implementations.Plugins
         /// <exception cref="ArgumentNullException">If the <see cref="LocalPlugin"/> is null.</exception>
         private bool TryGetPluginDlls(LocalPlugin plugin, out IReadOnlyList<string> whitelistedDlls)
         {
-            ArgumentNullException.ThrowIfNull(nameof(plugin));
+            ArgumentNullException.ThrowIfNull(plugin);
 
             IReadOnlyList<string> pluginDlls = Directory.GetFiles(plugin.Path, "*.dll", SearchOption.AllDirectories);
 

+ 1 - 1
Jellyfin.Api/Controllers/ItemUpdateController.cs

@@ -457,7 +457,7 @@ public class ItemUpdateController : BaseJellyfinApiController
             return null;
         }
 
-        return (SeriesStatus)Enum.Parse(typeof(SeriesStatus), item.Status, true);
+        return Enum.Parse<SeriesStatus>(item.Status, true);
     }
 
     private DateTime NormalizeDateTime(DateTime val)

+ 1 - 1
Jellyfin.Api/Jellyfin.Api.csproj

@@ -6,7 +6,7 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>
 

+ 1 - 1
Jellyfin.Data/Entities/User.cs

@@ -514,7 +514,7 @@ namespace Jellyfin.Data.Entities
         /// </summary>
         public void AddDefaultPreferences()
         {
-            foreach (var val in Enum.GetValues(typeof(PreferenceKind)).Cast<PreferenceKind>())
+            foreach (var val in Enum.GetValues<PreferenceKind>())
             {
                 Preferences.Add(new Preference(val, string.Empty));
             }

+ 1 - 1
Jellyfin.Data/Jellyfin.Data.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>

+ 1 - 1
Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 0 - 8
Jellyfin.Server/Helpers/StartupHelpers.cs

@@ -292,13 +292,5 @@ public static class StartupHelpers
         // Make sure we have all the code pages we can get
         // Ref: https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider.instance?view=netcore-3.0#remarks
         Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
-
-        // Increase the max http request limit
-        // The default connection limit is 10 for ASP.NET hosted applications and 2 for all others.
-        ServicePointManager.DefaultConnectionLimit = Math.Max(96, ServicePointManager.DefaultConnectionLimit);
-
-        // Disable the "Expect: 100-Continue" header by default
-        // http://stackoverflow.com/questions/566437/http-post-returns-the-error-417-expectation-failed-c
-        ServicePointManager.Expect100Continue = false;
     }
 }

+ 1 - 1
Jellyfin.Server/Jellyfin.Server.csproj

@@ -8,7 +8,7 @@
   <PropertyGroup>
     <AssemblyName>jellyfin</AssemblyName>
     <OutputType>Exe</OutputType>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <ServerGarbageCollection>false</ServerGarbageCollection>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>

+ 1 - 1
MediaBrowser.Common/MediaBrowser.Common.csproj

@@ -28,7 +28,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>

+ 1 - 1
MediaBrowser.Common/Plugins/BasePluginOfT.cs

@@ -193,7 +193,7 @@ namespace MediaBrowser.Common.Plugins
             }
             catch
             {
-                var config = (TConfigurationType)Activator.CreateInstance(typeof(TConfigurationType));
+                var config = Activator.CreateInstance<TConfigurationType>();
                 SaveConfiguration(config);
                 return config;
             }

+ 1 - 1
MediaBrowser.Controller/MediaBrowser.Controller.csproj

@@ -34,7 +34,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>

+ 1 - 1
MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj

@@ -11,7 +11,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 1 - 1
MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj

@@ -6,7 +6,7 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 1 - 1
MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs

@@ -1648,7 +1648,7 @@ namespace MediaBrowser.MediaEncoding.Probing
 
             using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 1))
             {
-                fs.Read(packetBuffer);
+                fs.ReadExactly(packetBuffer);
             }
 
             if (packetBuffer[0] == 71)

+ 2 - 2
MediaBrowser.Model/MediaBrowser.Model.csproj

@@ -14,7 +14,7 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>
@@ -35,7 +35,7 @@
   <ItemGroup>
     <FrameworkReference Include="Microsoft.AspNetCore.App" />
   </ItemGroup>
-  
+
   <ItemGroup>
     <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
     <PackageReference Include="MimeTypes">

+ 1 - 2
MediaBrowser.Providers/Manager/ProviderManager.cs

@@ -262,7 +262,7 @@ namespace MediaBrowser.Providers.Manager
             try
             {
                 var fileStream = AsyncFile.OpenRead(source);
-                await new ImageSaver(_configurationManager, _libraryMonitor, _fileSystem, _logger).SaveImage(item, fileStream, mimeType, type, imageIndex, saveLocallyWithMedia, cancellationToken);
+                await new ImageSaver(_configurationManager, _libraryMonitor, _fileSystem, _logger).SaveImage(item, fileStream, mimeType, type, imageIndex, saveLocallyWithMedia, cancellationToken).ConfigureAwait(false);
             }
             finally
             {
@@ -1031,7 +1031,6 @@ namespace MediaBrowser.Providers.Manager
         /// <inheritdoc/>
         public void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority)
         {
-            ArgumentNullException.ThrowIfNull(itemId);
             if (itemId.IsEmpty())
             {
                 throw new ArgumentException("Guid can't be empty", nameof(itemId));

+ 1 - 1
MediaBrowser.Providers/MediaBrowser.Providers.csproj

@@ -28,7 +28,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>

+ 1 - 1
MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj

@@ -15,7 +15,7 @@
   </ItemGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 2 - 2
README.md

@@ -74,7 +74,7 @@ These instructions will help you get set up with a local development environment
 
 ### Prerequisites
 
-Before the project can be built, you must first install the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet) on your system.
+Before the project can be built, you must first install the [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet) on your system.
 
 Instructions to run this project from the command line are included here, but you will also need to install an IDE if you want to debug the server while it is running. Any IDE that supports .NET 6 development will work, but two options are recent versions of [Visual Studio](https://visualstudio.microsoft.com/downloads/) (at least 2022) and [Visual Studio Code](https://code.visualstudio.com/Download).
 
@@ -131,7 +131,7 @@ A second option is to build the project and then run the resulting executable fi
 
 ```bash
 dotnet build                       # Build the project
-cd Jellyfin.Server/bin/Debug/net8.0 # Change into the build output directory
+cd Jellyfin.Server/bin/Debug/net9.0 # Change into the build output directory
 ```
 
 2. Execute the build output. On Linux, Mac, etc. use `./jellyfin` and on Windows use `jellyfin.exe`.

+ 1 - 1
fuzz/Emby.Server.Implementations.Fuzz/Emby.Server.Implementations.Fuzz.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh

@@ -8,4 +8,4 @@ cp bin/Emby.Server.Implementations.dll .
 
 dotnet build
 mkdir -p Findings
-AFL_SKIP_BIN_CHECK=1 afl-fuzz -i "Testcases/$1" -o "Findings/$1" -t 5000 ./bin/Debug/net8.0/Emby.Server.Implementations.Fuzz "$1"
+AFL_SKIP_BIN_CHECK=1 afl-fuzz -i "Testcases/$1" -o "Findings/$1" -t 5000 ./bin/Debug/net9.0/Emby.Server.Implementations.Fuzz "$1"

+ 1 - 1
fuzz/Jellyfin.Api.Fuzz/Jellyfin.Api.Fuzz.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
fuzz/Jellyfin.Api.Fuzz/fuzz.sh

@@ -8,4 +8,4 @@ cp bin/Jellyfin.Api.dll .
 
 dotnet build
 mkdir -p Findings
-AFL_SKIP_BIN_CHECK=1 afl-fuzz -i "Testcases/$1" -o "Findings/$1" -t 5000 ./bin/Debug/net8.0/Jellyfin.Api.Fuzz "$1"
+AFL_SKIP_BIN_CHECK=1 afl-fuzz -i "Testcases/$1" -o "Findings/$1" -t 5000 ./bin/Debug/net9.0/Jellyfin.Api.Fuzz "$1"

+ 1 - 1
global.json

@@ -1,6 +1,6 @@
 {
     "sdk": {
-        "version": "8.0.404",
+        "version": "9.0.0",
         "rollForward": "latestMinor"
     }
 }

+ 4 - 0
jellyfin.ruleset

@@ -154,6 +154,8 @@
     <!-- TODO: enable when false positives are fixed -->
     <!-- disable warning CA1508: Avoid dead conditional code -->
     <Rule Id="CA1508" Action="Info" />
+    <!-- disable warning CA1515: Consider making public types internal -->
+    <Rule Id="CA1515" Action="Info" />
     <!-- disable warning CA1716: Identifiers should not match keywords -->
     <Rule Id="CA1716" Action="Info" />
     <!-- disable warning CA1720: Identifiers should not contain type names -->
@@ -168,6 +170,8 @@
     <Rule Id="CA1812" Action="Info" />
     <!-- disable warning CA1822: Member does not access instance data and can be marked as static -->
     <Rule Id="CA1822" Action="Info" />
+    <!-- CA1859: Use concrete types when possible for improved performance -->
+    <Rule Id="CA1859" Action="Info" />
     <!-- TODO: Enable -->
     <!-- CA1861: Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array -->
     <Rule Id="CA1861" Action="Info" />

+ 1 - 1
src/Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj

@@ -6,7 +6,7 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <!-- TODO: Remove once we update SkiaSharp > 2.88.5 -->

+ 1 - 1
src/Jellyfin.Drawing/Jellyfin.Drawing.csproj

@@ -6,7 +6,7 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 1 - 1
src/Jellyfin.Extensions/Jellyfin.Extensions.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>

+ 0 - 1
src/Jellyfin.Extensions/Json/Converters/JsonDelimitedArrayConverter.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Linq;
 using System.Text.Json;
 using System.Text.Json.Serialization;
 

+ 1 - 1
src/Jellyfin.LiveTv/Jellyfin.LiveTv.csproj

@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>
 

+ 1 - 1
src/Jellyfin.MediaEncoding.Hls/Jellyfin.MediaEncoding.Hls.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>
 

+ 1 - 1
src/Jellyfin.MediaEncoding.Keyframes/Jellyfin.MediaEncoding.Keyframes.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>
 

+ 1 - 1
src/Jellyfin.Networking/Jellyfin.Networking.csproj

@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>

+ 1 - 1
src/Jellyfin.Networking/Manager/NetworkManager.cs

@@ -57,7 +57,7 @@ public class NetworkManager : INetworkManager, IDisposable
     /// <summary>
     /// Dictionary containing interface addresses and their subnets.
     /// </summary>
-    private IReadOnlyList<IPData> _interfaces;
+    private List<IPData> _interfaces;
 
     /// <summary>
     /// Unfiltered user defined LAN subnets (<see cref="NetworkConfiguration.LocalNetworkSubnets"/>)

+ 1 - 1
tests/Directory.Build.props

@@ -4,7 +4,7 @@
   <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
 
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
     <IsPackable>false</IsPackable>
     <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)/jellyfin-tests.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>

+ 1 - 1
tests/Jellyfin.Extensions.Tests/Json/Models/GenericBodyArrayModel.cs

@@ -8,7 +8,7 @@ namespace Jellyfin.Extensions.Tests.Json.Models
     /// The generic body model.
     /// </summary>
     /// <typeparam name="T">The value type.</typeparam>
-    public class GenericBodyArrayModel<T>
+    public sealed class GenericBodyArrayModel<T>
     {
         /// <summary>
         /// Gets or sets the value.

+ 1 - 1
tests/Jellyfin.Extensions.Tests/Json/Models/GenericBodyIReadOnlyListModel.cs

@@ -8,7 +8,7 @@ namespace Jellyfin.Extensions.Tests.Json.Models
     /// The generic body <c>IReadOnlyList</c> model.
     /// </summary>
     /// <typeparam name="T">The value type.</typeparam>
-    public class GenericBodyIReadOnlyListModel<T>
+    public sealed class GenericBodyIReadOnlyListModel<T>
     {
         /// <summary>
         /// Gets or sets the value.

+ 2 - 2
tests/Jellyfin.LiveTv.Tests/Jellyfin.LiveTv.Tests.csproj

@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFramework>net8.0</TargetFramework>
+    <TargetFramework>net9.0</TargetFramework>
   </PropertyGroup>
 
   <ItemGroup>
@@ -22,7 +22,7 @@
     <PackageReference Include="Xunit.SkippableFact" />
     <PackageReference Include="coverlet.collector" />
   </ItemGroup>
-  
+
   <ItemGroup>
     <ProjectReference Include="..\..\src\Jellyfin.LiveTv\Jellyfin.LiveTv.csproj" />
   </ItemGroup>

+ 1 - 1
tests/Jellyfin.Server.Implementations.Tests/TypedBaseItem/BaseItemKindTests.cs

@@ -35,7 +35,7 @@ namespace Jellyfin.Server.Implementations.Tests.TypedBaseItem
         public void EnumParse_GivenValidBaseItemType_ReturnsEnumValue(Type baseItemDescendantType)
         {
             var enumValue = Enum.Parse<BaseItemKind>(baseItemDescendantType.Name);
-            Assert.True(Enum.IsDefined(typeof(BaseItemKind), enumValue));
+            Assert.True(Enum.IsDefined(enumValue));
         }
 
         [Theory]