Update projects to .NET 9 (#13023)

This commit is contained in:
Bond-009
2024-11-16 18:11:01 +01:00
committed by GitHub
parent 5e8c0fe40c
commit ceb850c770
51 changed files with 63 additions and 69 deletions

View File

@@ -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>

View File

@@ -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.

View File

@@ -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.

View File

@@ -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>

View File

@@ -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]