New: Multi target net framework 4.6.2 and net core 3.0

This commit is contained in:
ta264
2019-10-28 21:30:08 +00:00
parent 9f5dac3789
commit 4346c76d4f
99 changed files with 896 additions and 850 deletions
+14 -3
View File
@@ -5,7 +5,6 @@ using System.Linq;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using NLog;
@@ -77,6 +76,10 @@ namespace NzbDrone.Host
});
}
})
.ConfigureKestrel(serverOptions =>
{
serverOptions.AllowSynchronousIO = true;
})
.ConfigureLogging(logging =>
{
logging.AddProvider(new NLogLoggerProvider());
@@ -86,15 +89,23 @@ namespace NzbDrone.Host
{
services
.AddSignalR()
.AddJsonProtocol(options =>
#if !NETCOREAPP3_0
.AddJsonProtocol(
#else
.AddNewtonsoftJsonProtocol(
#endif
options =>
{
options.PayloadSerializerSettings = Json.GetSerializerSettings();
});
})
.Configure(app =>
{
app.UsePathBase(_configFileProvider.UrlBase);
#if NETCOREAPP3_0
app.UseRouting();
#endif
app.Properties["host.AppName"] = BuildInfo.AppName;
app.UsePathBase(_configFileProvider.UrlBase);
foreach (var middleWare in _middlewares.OrderBy(c => c.Order))
{