mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Upgrade to .NET Core 2.1 RC1 (ARM support)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -9,14 +9,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Autofac" Version="4.8.0" />
|
<PackageReference Include="Autofac" Version="4.8.1" />
|
||||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.2" />
|
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.2" />
|
||||||
<PackageReference Include="AutoMapper" Version="6.2.2" />
|
<PackageReference Include="AutoMapper" Version="6.2.2" />
|
||||||
<PackageReference Include="CommandLineParser" Version="2.2.1" />
|
<PackageReference Include="CommandLineParser" Version="2.2.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0-rc1-final" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.0.1" />
|
|
||||||
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.4.0" />
|
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.4.0" />
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.4.0" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -41,7 +41,7 @@ namespace Jackett.Server
|
|||||||
|
|
||||||
Configuration = builder.Build();
|
Configuration = builder.Build();
|
||||||
|
|
||||||
BuildWebHost().Run();
|
CreateWebHostBuilder(args).Build().Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Dictionary<string, string> GetValues(object obj)
|
public static Dictionary<string, string> GetValues(object obj)
|
||||||
@@ -52,10 +52,9 @@ namespace Jackett.Server
|
|||||||
.ToDictionary(p => "RuntimeSettings:" + p.Name, p => p.GetValue(obj) == null ? null : p.GetValue(obj).ToString());
|
.ToDictionary(p => "RuntimeSettings:" + p.Name, p => p.GetValue(obj) == null ? null : p.GetValue(obj).ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IWebHost BuildWebHost() =>
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||||
WebHost.CreateDefaultBuilder()
|
WebHost.CreateDefaultBuilder(args)
|
||||||
.UseConfiguration(Configuration)
|
.UseConfiguration(Configuration)
|
||||||
.UseStartup<Startup>()
|
.UseStartup<Startup>();
|
||||||
.Build();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Authorization;
|
using Microsoft.AspNetCore.Mvc.Authorization;
|
||||||
using Microsoft.AspNetCore.Rewrite;
|
using Microsoft.AspNetCore.Rewrite;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
@@ -55,7 +56,8 @@ namespace Jackett.Server
|
|||||||
.AddJsonOptions(options =>
|
.AddJsonOptions(options =>
|
||||||
{
|
{
|
||||||
options.SerializerSettings.ContractResolver = new DefaultContractResolver(); //Web app uses Pascal Case JSON
|
options.SerializerSettings.ContractResolver = new DefaultContractResolver(); //Web app uses Pascal Case JSON
|
||||||
});
|
})
|
||||||
|
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||||
|
|
||||||
RuntimeSettings runtimeSettings = new RuntimeSettings();
|
RuntimeSettings runtimeSettings = new RuntimeSettings();
|
||||||
Configuration.GetSection("RuntimeSettings").Bind(runtimeSettings);
|
Configuration.GetSection("RuntimeSettings").Bind(runtimeSettings);
|
||||||
|
Reference in New Issue
Block a user