core: update net462 (#13873)

This commit is contained in:
Diego Heras 2023-01-07 20:38:52 +01:00 committed by GitHub
parent 89d6f4a656
commit 92c711eb19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 19 deletions

View File

@ -95,7 +95,7 @@ stages:
Mono:
buildDescription: Mono
imageName: ubuntu-22.04
framework: net461
framework: net462
runtime: linux-x64
archiveType: tar
artifactName: Jackett.Binaries.Mono.tar.gz
@ -419,7 +419,7 @@ stages:
Mono:
buildDescription: Mono
imageName: ubuntu-22.04
framework: net461
framework: net462
runtime: linux-x64
pool:
vmImage: $(imageName)
@ -518,7 +518,7 @@ stages:
buildDescription: Mono
imageName: ubuntu-22.04
artifactName: Jackett.Binaries.Mono.tar.gz
framework: net461
framework: net462
runtime: linux-x64
pool:
vmImage: $(imageName)

View File

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

View File

@ -3,7 +3,7 @@ using Jackett.Common.Models.Config;
using Jackett.Common.Services.Interfaces;
using Microsoft.AspNetCore.Hosting;
using NLog;
#if !NET461
#if !NET462
using Microsoft.Extensions.Hosting;
#endif
@ -13,7 +13,7 @@ namespace Jackett.Server
{
public static IContainer ApplicationContainer { get; set; }
#if NET461
#if NET462
public static IApplicationLifetime applicationLifetime;
#else
public static IHostApplicationLifetime applicationLifetime;

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<ApplicationIcon>jackett.ico</ApplicationIcon>
<OutputType>Exe</OutputType>
<NoWarn></NoWarn>
@ -20,7 +20,7 @@
</PropertyGroup>
<Choose>
<When Condition="'$(TargetFramework)' != 'net461' and $(RuntimeIdentifier.Contains('win')) == 'false'">
<When Condition="'$(TargetFramework)' != 'net462' and $(RuntimeIdentifier.Contains('win')) == 'false'">
<PropertyGroup>
<AssemblyName>jackett</AssemblyName>
</PropertyGroup>
@ -39,8 +39,8 @@
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="6.0.0" />
</ItemGroup>
<!-- Conditionally obtain references for the .NET461 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<!-- Conditionally obtain references for the .NET462 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />

View File

@ -22,7 +22,7 @@ using Microsoft.AspNetCore.Rewrite;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json.Serialization;
#if !NET461
#if !NET462
using Microsoft.Extensions.Hosting;
#endif
@ -56,7 +56,7 @@ namespace Jackett.Server
options.Cookie.Name = "Jackett";
});
#if NET461
#if NET462
services.AddMvc(
config => config.Filters.Add(
new AuthorizeFilter(
@ -108,7 +108,7 @@ namespace Jackett.Server
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
#if NET461
#if NET462
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime applicationLifetime)
{
applicationLifetime.ApplicationStarted.Register(OnStarted);

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<NoWarn />
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
@ -45,8 +45,8 @@
<ProjectReference Include="..\Jackett.Server\Jackett.Server.csproj" />
</ItemGroup>
<!-- Conditionally obtain references for the .NET461 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<!-- Conditionally obtain references for the .NET462 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
<Reference Include="System.Web" />
</ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<ApplicationIcon>jackett.ico</ApplicationIcon>
<AssemblyName>JackettUpdater</AssemblyName>
<OutputType>Exe</OutputType>
@ -13,8 +13,8 @@
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISLINUXMUSL</DefineConstants>
</PropertyGroup>
<!-- Conditionally obtain references for the .NET461 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<!-- Conditionally obtain references for the .NET462 target -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
</ItemGroup>