core: Update .Net 6.0 (#12562)

This commit is contained in:
Diego Heras 2021-11-17 06:06:27 +01:00 committed by GitHub
parent f08db1adc2
commit 03c9e3036c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 59 additions and 57 deletions

View File

@ -20,7 +20,7 @@ A third-party Golang SDK for Jackett is available from [webtor-io/go-jackett](ht
#### Supported Systems #### Supported Systems
* Windows 7 SP1 or greater * Windows 7 SP1 or greater
* Linux [supported operating systems here](https://github.com/dotnet/core/blob/master/release-notes/5.0/5.0-supported-os.md#linux) * Linux [supported operating systems here](https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#linux)
* macOS 10.13 or greater * macOS 10.13 or greater
<details> <summary> <b> Supported Public Trackers </b> </summary> <details> <summary> <b> Supported Public Trackers </b> </summary>
@ -647,7 +647,7 @@ We recommend you install Jackett as a Windows service using the supplied install
To get started with using the installer for Jackett, follow the steps below: 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=net50#dependencies 1. Check if you need any .NET prerequisites installed, see https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60#dependencies
2. Download the latest version of the Windows installer, "Jackett.Installer.Windows.exe" from the [releases](https://github.com/Jackett/Jackett/releases/latest) page. 2. Download the latest version of the Windows installer, "Jackett.Installer.Windows.exe" from the [releases](https://github.com/Jackett/Jackett/releases/latest) page.
3. When prompted if you would like this app to make changes to your computer, select "yes". 3. When prompted if you would like this app to make changes to your computer, select "yes".
4. If you would like to install Jackett as a Windows Service, make sure the "Install as Windows Service" checkbox is filled. 4. If you would like to install Jackett as a Windows Service, make sure the "Install as Windows Service" checkbox is filled.
@ -853,21 +853,21 @@ git clone https://github.com/Jackett/Jackett.git
cd Jackett/src cd Jackett/src
# dotnet core version # dotnet core version
dotnet publish Jackett.Server -f net5.0 --self-contained -r osx-x64 -c Debug # takes care of everything dotnet publish Jackett.Server -f net6.0 --self-contained -r osx-x64 -c Debug # takes care of everything
./Jackett.Server/bin/Debug/net5.0/osx-x64/jackett # run jackett ./Jackett.Server/bin/Debug/net6.0/osx-x64/jackett # run jackett
``` ```
### Linux ### Linux
```bash ```bash
sudo apt install nuget msbuild dotnet-sdk-5.0 # install build tools (Debian/ubuntu) sudo apt install nuget msbuild dotnet-sdk-6.0 # install build tools (Debian/ubuntu)
git clone https://github.com/Jackett/Jackett.git git clone https://github.com/Jackett/Jackett.git
cd Jackett/src cd Jackett/src
# dotnet core version # dotnet core version
dotnet publish Jackett.Server -f net5.0 --self-contained -r linux-x64 -c Debug # takes care of everything dotnet publish Jackett.Server -f net6.0 --self-contained -r linux-x64 -c Debug # takes care of everything
./Jackett.Server/bin/Debug/net5.0/linux-x64/jackett # run jackett ./Jackett.Server/bin/Debug/net6.0/linux-x64/jackett # run jackett
``` ```
## Screenshots ## Screenshots

View File

@ -2,12 +2,12 @@
name: $(majorVersion).$(minorVersion).$(patchVersion) name: $(majorVersion).$(minorVersion).$(patchVersion)
variables: variables:
majorVersion: 0 majorVersion: 0
minorVersion: 19 minorVersion: 20
patchVersion: $[counter(variables['minorVersion'], 1)] # this will reset when we bump minor patchVersion: $[counter(variables['minorVersion'], 1)] # this will reset when we bump minor
jackettVersion: $(majorVersion).$(minorVersion).$(patchVersion) jackettVersion: $(majorVersion).$(minorVersion).$(patchVersion)
buildConfiguration: Release buildConfiguration: Release
netCoreFramework: net5.0 netCoreFramework: net6.0
netCoreSdkVersion: 5.0.x netCoreSdkVersion: 6.0.x
# system.debug: true # system.debug: true
trigger: trigger:
@ -380,7 +380,7 @@ stages:
inputs: inputs:
command: build command: build
projects: '**/*.Test*/*.csproj' projects: '**/*.Test*/*.csproj'
arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework)' arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework) --no-self-contained'
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2
displayName: Unit Tests (Mono, Linux and macOS) displayName: Unit Tests (Mono, Linux and macOS)
@ -388,7 +388,7 @@ stages:
inputs: inputs:
command: test command: test
projects: '**/*.Test*/*.csproj' projects: '**/*.Test*/*.csproj'
arguments: '--configuration $(buildConfiguration) --framework $(framework) --runtime $(runtime)' arguments: '--configuration $(buildConfiguration) --runtime $(runtime) --framework $(framework)'
testRunTitle: 'Unit - $(buildDescription) - $(Build.BuildId)' testRunTitle: 'Unit - $(buildDescription) - $(Build.BuildId)'
- task: DotNetCoreCLI@2 - task: DotNetCoreCLI@2

View File

@ -10,24 +10,24 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AngleSharp" Version="0.14.0" /> <PackageReference Include="AngleSharp" Version="0.16.1" />
<PackageReference Include="Autofac" Version="5.2.0" /> <PackageReference Include="Autofac" Version="6.3.0" />
<PackageReference Include="AutoMapper" Version="10.1.1" /> <PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="BencodeNET" Version="3.1.4" /> <PackageReference Include="BencodeNET" Version="4.0.0" />
<PackageReference Include="FlareSolverrSharp" Version="2.0.0" /> <PackageReference Include="FlareSolverrSharp" Version="2.1.0" />
<PackageReference Include="CommandLineParser" Version="2.8.0" /> <PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" /> <PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" /> <PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="MimeMapping" Version="1.0.1.30" /> <PackageReference Include="MimeMapping" Version="1.0.1.37" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog" Version="4.7.5" /> <PackageReference Include="NLog" Version="4.7.12" />
<PackageReference Include="polly" Version="7.2.1" /> <PackageReference Include="polly" Version="7.2.2" />
<PackageReference Include="SharpZipLib" Version="1.2.0" /> <PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" /> <PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" /> <PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0" />
<PackageReference Include="YamlDotNet" Version="8.1.2" /> <PackageReference Include="YamlDotNet" Version="11.2.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -252,7 +252,7 @@ namespace Jackett.Common.Services
Stream inStream = File.OpenRead(gzPath); Stream inStream = File.OpenRead(gzPath);
Stream gzipStream = new GZipInputStream(inStream); Stream gzipStream = new GZipInputStream(inStream);
var tarArchive = TarArchive.CreateInputTarArchive(gzipStream); var tarArchive = TarArchive.CreateInputTarArchive(gzipStream, null);
tarArchive.ExtractContents(tempDir); tarArchive.ExtractContents(tempDir);
tarArchive.Close(); tarArchive.Close();
gzipStream.Close(); gzipStream.Close();

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<NoWarn /> <NoWarn />
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
@ -9,11 +9,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" /> <PackageReference Include="MSTest.TestAdapter" Version="2.2.7" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" /> <PackageReference Include="MSTest.TestFramework" Version="2.2.7" />
<PackageReference Include="Selenium.Chrome.WebDriver" Version="85.0.0" /> <PackageReference Include="Selenium.Chrome.WebDriver" Version="85.0.0" />
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" /> <PackageReference Include="Selenium.WebDriver" Version="4.0.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net5.0;net461</TargetFrameworks> <TargetFrameworks>net6.0;net461</TargetFrameworks>
<ApplicationIcon>jackett.ico</ApplicationIcon> <ApplicationIcon>jackett.ico</ApplicationIcon>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<NoWarn></NoWarn> <NoWarn></NoWarn>
<ServerGarbageCollection>false</ServerGarbageCollection> <ServerGarbageCollection>false</ServerGarbageCollection>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net5.0|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors /> <WarningsAsErrors />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net5.0|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors /> <WarningsAsErrors />
</PropertyGroup> </PropertyGroup>
@ -31,12 +31,12 @@
</Otherwise> </Otherwise>
</Choose> </Choose>
<!-- Conditionally obtain references for the .NET 5.0 target --> <!-- Conditionally obtain references for the .NET 6.0 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" /> <PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="5.0.0" /> <PackageReference Include="System.Security.Cryptography.ProtectedData" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<!-- Conditionally obtain references for the .NET461 target --> <!-- Conditionally obtain references for the .NET461 target -->
@ -53,14 +53,14 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac" Version="5.2.0" /> <PackageReference Include="Autofac" Version="6.3.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" /> <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
<PackageReference Include="AutoMapper" Version="10.1.1" /> <PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="CommandLineParser" Version="2.8.0" /> <PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="NLog" Version="4.7.5" /> <PackageReference Include="NLog" Version="4.7.12" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.3" /> <PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" /> <PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -25,10 +25,12 @@ namespace Jackett.Server.Services
byte[] hashValue; byte[] hashValue;
var message = UE.GetBytes(input); var message = UE.GetBytes(input);
#pragma warning disable SYSLIB0021
var hashString = new SHA512Managed(); var hashString = new SHA512Managed();
var hex = ""; #pragma warning restore SYSLIB0021
hashValue = hashString.ComputeHash(message); hashValue = hashString.ComputeHash(message);
var hex = "";
foreach (var x in hashValue) foreach (var x in hashValue)
{ {
hex += string.Format("{0:x2}", x); hex += string.Format("{0:x2}", x);

View File

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

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net5.0;net461</TargetFrameworks> <TargetFrameworks>net6.0;net461</TargetFrameworks>
<NoWarn /> <NoWarn />
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors /> <WarningsAsErrors />
@ -19,20 +19,20 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac" Version="5.2.0" /> <PackageReference Include="Autofac" Version="6.3.0" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0"> <PackageReference Include="coverlet.msbuild" Version="3.1.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="FluentAssertions" Version="5.10.3" /> <PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="5.0.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" /> <PackageReference Include="MSTest.TestAdapter" Version="2.2.7" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" /> <PackageReference Include="MSTest.TestFramework" Version="2.2.7" />
<PackageReference Include="NUnit" Version="3.13.2" /> <PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.12.0" /> <PackageReference Include="NUnit.ConsoleRunner" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" /> <PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

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

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net461;net5.0</TargetFrameworks> <TargetFrameworks>net6.0;net461</TargetFrameworks>
<ApplicationIcon>jackett.ico</ApplicationIcon> <ApplicationIcon>jackett.ico</ApplicationIcon>
<AssemblyName>JackettUpdater</AssemblyName> <AssemblyName>JackettUpdater</AssemblyName>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
@ -14,7 +14,7 @@
<!-- Conditionally obtain references for the .NET461 target --> <!-- Conditionally obtain references for the .NET461 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' "> <ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" /> <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>