core: bump to .net 10

This commit is contained in:
Bogdan
2025-09-10 15:14:10 +03:00
parent 3011b5397a
commit 31bcce2ae8
10 changed files with 47 additions and 34 deletions

View File

@@ -20,10 +20,10 @@ The software implements the [Torznab](https://torznab.github.io/spec-1.3-draft/i
A third-party Golang SDK for Jackett is available from [webtor-io/go-jackett](https://github.com/webtor-io/go-jackett)
#### Supported Systems
The currently supported version of Jackett is 0.23.+, which is compatible with the following OS:
* Windows 10 Version 1607+ or greater [supported operating systems here](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md#windows)
* Linux [supported operating systems here](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md#linux)
* macOS 13.0+ (Ventura) or greater [supported operating systems here](https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md#macos)
The currently supported version of Jackett is 0.24.+, which is compatible with the following OS:
* Windows 10 Version 1607+ or greater [supported operating systems here](https://github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md#windows)
* Linux [supported operating systems here](https://github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md#linux)
* macOS 14.0+ (Sonoma) or greater [supported operating systems here](https://github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md#apple)
Prior versions of Jackett are no longer supported.
@@ -714,7 +714,7 @@ We recommend you install Jackett as a Windows service using the supplied [Window
To get started with using the installer for Jackett, follow the steps below:
1. Check if you need any .NET prerequisites installed, see https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net80#dependencies
1. Check if you need any .NET prerequisites installed, see https://learn.microsoft.com/en-us/dotnet/core/install/windows#net-installer
2. Download the latest version of the [Windows installer](https://github.com/Jackett/Jackett/releases/latest/download/Jackett.Installer.Windows.exe)
3. Run the Jackett.Installer.Windows.exe program.
4. When prompted if you would like this app to make changes to your computer, select "yes".
@@ -938,8 +938,8 @@ git clone https://github.com/Jackett/Jackett.git
cd Jackett/src
# dotnet core version
dotnet publish Jackett.Server -f net8.0 --self-contained -r osx-x64 -c Debug # takes care of everything
./Jackett.Server/bin/Debug/net8.0/osx-x64/jackett # run jackett
dotnet publish Jackett.Server -f net10.0 --self-contained -r osx-x64 -c Debug # takes care of everything
./Jackett.Server/bin/Debug/net10.0/osx-x64/jackett # run jackett
```
### Linux
@@ -951,8 +951,8 @@ git clone https://github.com/Jackett/Jackett.git
cd Jackett/src
# dotnet core version
dotnet publish Jackett.Server -f net8.0 --self-contained -r linux-x64 -c Debug # takes care of everything
./Jackett.Server/bin/Debug/net8.0/linux-x64/jackett # run jackett
dotnet publish Jackett.Server -f net10.0 --self-contained -r linux-x64 -c Debug # takes care of everything
./Jackett.Server/bin/Debug/net10.0/linux-x64/jackett # run jackett
```
## Screenshots

View File

@@ -2,12 +2,12 @@
name: $(majorVersion).$(minorVersion).$(patchVersion)
variables:
majorVersion: 0
minorVersion: 23
minorVersion: 24
patchVersion: $[counter(variables['minorVersion'], 1)] # this will reset when we bump minor
jackettVersion: $(majorVersion).$(minorVersion).$(patchVersion)
buildConfiguration: Release
netCoreFramework: net8.0
netCoreSdkVersion: 8.0.x
netCoreFramework: net10.0
netCoreSdkVersion: 10.0.x
# system.debug: true
trigger:
@@ -124,6 +124,7 @@ stages:
packageType: sdk
version: $(netCoreSdkVersion)
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: Build DateTimeRoutines
@@ -341,6 +342,7 @@ stages:
packageType: sdk
version: $(netCoreSdkVersion)
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: Install Dotnet Format
@@ -451,6 +453,7 @@ stages:
packageType: sdk
version: $(netCoreSdkVersion)
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: Unit Tests & Code Coverage
@@ -499,7 +502,7 @@ stages:
- task: PublishPipelineArtifact@1
condition: and(succeeded(), startsWith(variables['runtime'], 'win'))
inputs:
targetPath: $(Build.SourcesDirectory)/coverlet/reports/coverage.cobertura.Windows.net8.0.xml
targetPath: $(Build.SourcesDirectory)/coverlet/reports/coverage.cobertura.Windows.net10.0.xml
- stage: IntegrationTestJackett
displayName: Integration Tests
@@ -576,6 +579,7 @@ stages:
packageType: sdk
version: $(netCoreSdkVersion)
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: Integration Tests

View File

@@ -23,12 +23,12 @@
<PackageReference Include="MimeMapping" Version="1.0.1.50" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.4.0" />
<PackageReference Include="Polly" Version="8.6.1" />
<PackageReference Include="Polly" Version="8.6.3" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="System.Text.Json" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
</ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net471</TargetFrameworks>
<TargetFrameworks>net10.0;net471</TargetFrameworks>
<IsPackable>false</IsPackable>
<NoWarn />
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<PackageId>$(MSBuildProjectName)</PackageId>
<TargetFrameworks>net8.0;net471</TargetFrameworks>
<TargetFrameworks>net10.0;net471</TargetFrameworks>
<ApplicationIcon>jackett.ico</ApplicationIcon>
<OutputType>Exe</OutputType>
<NoWarn></NoWarn>
@@ -10,12 +10,12 @@
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISLINUXMUSL</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net10.0|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net10.0|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
@@ -33,11 +33,11 @@
</Otherwise>
</Choose>
<!-- Conditionally obtain references for the .NET 8.0 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.17" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="8.0.0" />
<!-- Conditionally obtain references for the .NET 10.0 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="10.0.0-rc.1.25451.107" />
</ItemGroup>
<!-- Conditionally obtain references for the .NET471 target -->
@@ -59,8 +59,8 @@
<PackageReference Include="Mono.Posix" Version="7.1.0-final.1.21458.1" />
<PackageReference Include="NLog" Version="5.4.0" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.4.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="10.0.0-rc.1.25451.107" />
</ItemGroup>
<ItemGroup>

View File

@@ -56,6 +56,7 @@ namespace Jackett.Server
options.Cookie.Name = "Jackett";
});
#if NET471
services.Configure<ForwardedHeadersOptions>(options =>
{
// When adjusting these parameters make sure it's well tested with various environments
@@ -66,7 +67,6 @@ namespace Jackett.Server
options.KnownProxies.Clear();
});
#if NET471
services.AddMvc(
config => config.Filters.Add(
new AuthorizeFilter(
@@ -74,6 +74,15 @@ namespace Jackett.Server
.AddJsonOptions(options => options.SerializerSettings.ContractResolver =
new DefaultContractResolver()); //Web app uses Pascal Case JSON);
#else
services.Configure<ForwardedHeadersOptions>(options =>
{
// When adjusting these parameters make sure it's well tested with various environments
// See https://github.com/Jackett/Jackett/issues/3517
options.ForwardLimit = 10;
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost;
options.KnownIPNetworks.Clear();
options.KnownProxies.Clear();
});
services.AddControllers(
config => config.Filters.Add(

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<AssemblyName>JackettService</AssemblyName>
<ApplicationIcon>jackett.ico</ApplicationIcon>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net471</TargetFrameworks>
<TargetFrameworks>net10.0;net471</TargetFrameworks>
<NoWarn />
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
@@ -25,14 +25,14 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="10.0.0-rc.1.25451.107" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.17.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="10.0.0-rc.1.25451.107" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyName>JackettTray</AssemblyName>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net471</TargetFrameworks>
<TargetFrameworks>net10.0;net471</TargetFrameworks>
<ApplicationIcon>jackett.ico</ApplicationIcon>
<AssemblyName>JackettUpdater</AssemblyName>
<OutputType>Exe</OutputType>