From 48baef1dfdfb985ca7095b83146016681b38eca1 Mon Sep 17 00:00:00 2001 From: Jamie Date: Wed, 20 Jun 2018 21:14:16 +0100 Subject: [PATCH] Update to .net 2.1.1 --- src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj | 2 +- src/Ombi.Api.Service/Ombi.Api.Service.csproj | 2 +- src/Ombi.Api/Ombi.Api.csproj | 2 +- src/Ombi.Core.Tests/Ombi.Core.Tests.csproj | 2 +- src/Ombi.Core/Ombi.Core.csproj | 4 +--- .../Ombi.DependencyInjection.csproj | 6 +++--- src/Ombi.Helpers/Ombi.Helpers.csproj | 4 ++-- .../Ombi.Notifications.Tests.csproj | 2 +- .../Ombi.Schedule.Tests.csproj | 4 ++-- .../PlexAvailabilityCheckerTests.cs | 2 +- src/Ombi.Settings/Ombi.Settings.csproj | 2 +- src/Ombi.Store/Ombi.Store.csproj | 8 ++++---- src/Ombi.Tests/Ombi.Tests.csproj | 4 ++-- src/Ombi.Updater/Ombi.Updater.csproj | 16 ++++++++-------- src/Ombi/Controllers/SettingsController.cs | 10 ++-------- src/Ombi/Ombi.csproj | 9 ++++----- src/Ombi/Startup.cs | 10 ---------- src/Ombi/StartupExtensions.cs | 5 ++--- 18 files changed, 37 insertions(+), 57 deletions(-) diff --git a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj index ff506dc35..0c615f301 100644 --- a/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj +++ b/src/Ombi.Api.Radarr/Ombi.Api.Radarr.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Ombi.Api.Service/Ombi.Api.Service.csproj b/src/Ombi.Api.Service/Ombi.Api.Service.csproj index 4a7f4865e..8cbddd874 100644 --- a/src/Ombi.Api.Service/Ombi.Api.Service.csproj +++ b/src/Ombi.Api.Service/Ombi.Api.Service.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Ombi.Api/Ombi.Api.csproj b/src/Ombi.Api/Ombi.Api.csproj index 533bcfcda..804512945 100644 --- a/src/Ombi.Api/Ombi.Api.csproj +++ b/src/Ombi.Api/Ombi.Api.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj index b9960aa7f..a4f6aeed8 100644 --- a/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj +++ b/src/Ombi.Core.Tests/Ombi.Core.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Ombi.Core/Ombi.Core.csproj b/src/Ombi.Core/Ombi.Core.csproj index 1c09c88e3..6bd3e0f9d 100644 --- a/src/Ombi.Core/Ombi.Core.csproj +++ b/src/Ombi.Core/Ombi.Core.csproj @@ -12,9 +12,7 @@ - - - + diff --git a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj index d2f94127f..2e7f984a7 100644 --- a/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj +++ b/src/Ombi.DependencyInjection/Ombi.DependencyInjection.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/src/Ombi.Helpers/Ombi.Helpers.csproj b/src/Ombi.Helpers/Ombi.Helpers.csproj index 4b104eadb..e94afc816 100644 --- a/src/Ombi.Helpers/Ombi.Helpers.csproj +++ b/src/Ombi.Helpers/Ombi.Helpers.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj index 01721db3f..451aba98b 100644 --- a/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj +++ b/src/Ombi.Notifications.Tests/Ombi.Notifications.Tests.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj index d147af88f..24a7308cb 100644 --- a/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj +++ b/src/Ombi.Schedule.Tests/Ombi.Schedule.Tests.csproj @@ -5,12 +5,12 @@ - + - + diff --git a/src/Ombi.Schedule.Tests/PlexAvailabilityCheckerTests.cs b/src/Ombi.Schedule.Tests/PlexAvailabilityCheckerTests.cs index 0ebb4732c..55c9dc288 100644 --- a/src/Ombi.Schedule.Tests/PlexAvailabilityCheckerTests.cs +++ b/src/Ombi.Schedule.Tests/PlexAvailabilityCheckerTests.cs @@ -26,7 +26,7 @@ namespace Ombi.Schedule.Tests _tv = new Mock(); _movie = new Mock(); _notify = new Mock(); - Checker = new PlexAvailabilityChecker(_repo.Object, _tv.Object, _movie.Object, _notify.Object, new Mock().Object); + Checker = new PlexAvailabilityChecker(_repo.Object, _tv.Object, _movie.Object, _notify.Object, new Mock().Object, null); } diff --git a/src/Ombi.Settings/Ombi.Settings.csproj b/src/Ombi.Settings/Ombi.Settings.csproj index 8709fd906..19a415a47 100644 --- a/src/Ombi.Settings/Ombi.Settings.csproj +++ b/src/Ombi.Settings/Ombi.Settings.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Ombi.Store/Ombi.Store.csproj b/src/Ombi.Store/Ombi.Store.csproj index b9ff73ef1..db034ca12 100644 --- a/src/Ombi.Store/Ombi.Store.csproj +++ b/src/Ombi.Store/Ombi.Store.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/src/Ombi.Tests/Ombi.Tests.csproj b/src/Ombi.Tests/Ombi.Tests.csproj index 639276a75..1b7dd3fe3 100644 --- a/src/Ombi.Tests/Ombi.Tests.csproj +++ b/src/Ombi.Tests/Ombi.Tests.csproj @@ -7,12 +7,12 @@ - + - + diff --git a/src/Ombi.Updater/Ombi.Updater.csproj b/src/Ombi.Updater/Ombi.Updater.csproj index e46a45551..07fb92d81 100644 --- a/src/Ombi.Updater/Ombi.Updater.csproj +++ b/src/Ombi.Updater/Ombi.Updater.csproj @@ -12,14 +12,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Ombi/Controllers/SettingsController.cs b/src/Ombi/Controllers/SettingsController.cs index 2e489adf2..6f013b9c1 100644 --- a/src/Ombi/Controllers/SettingsController.cs +++ b/src/Ombi/Controllers/SettingsController.cs @@ -1,21 +1,15 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.IO; using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; using System.Reflection; using System.Runtime.InteropServices; -using System.Text; using System.Threading.Tasks; using AutoMapper; using Hangfire; -using Hangfire.RecurringJobExtensions; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Caching.Memory; -using Microsoft.Extensions.PlatformAbstractions; using NCrontab; using Ombi.Api.Emby; using Ombi.Attributes; @@ -115,7 +109,7 @@ namespace Ombi.Controllers OsArchitecture = RuntimeInformation.OSArchitecture.ToString(), OsDescription = RuntimeInformation.OSDescription, ProcessArchitecture = RuntimeInformation.ProcessArchitecture.ToString(), - ApplicationBasePath =PlatformServices.Default.Application.ApplicationBasePath + ApplicationBasePath =Directory.GetCurrentDirectory() }; var version = AssemblyHelper.GetRuntimeVersion(); diff --git a/src/Ombi/Ombi.csproj b/src/Ombi/Ombi.csproj index add872a33..628acd2bc 100644 --- a/src/Ombi/Ombi.csproj +++ b/src/Ombi/Ombi.csproj @@ -66,11 +66,10 @@ - - - - - + + + + diff --git a/src/Ombi/Startup.cs b/src/Ombi/Startup.cs index 8037a3021..9db142625 100644 --- a/src/Ombi/Startup.cs +++ b/src/Ombi/Startup.cs @@ -1,20 +1,12 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Net; -using System.Security.Principal; -using System.Threading.Tasks; using AutoMapper; using AutoMapper.EquivalencyExpression; using Hangfire; -using Hangfire.Console; using Hangfire.Dashboard; using Hangfire.SQLite; -using Microsoft.ApplicationInsights.Extensibility; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.SpaServices.Webpack; @@ -34,7 +26,6 @@ using Ombi.Store.Context; using Ombi.Store.Entities; using Ombi.Store.Repository; using Serilog; -using Serilog.Events; namespace Ombi { @@ -87,7 +78,6 @@ namespace Ombi // This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) { - TelemetryConfiguration.Active.DisableTelemetry = true; // Add framework services. services.AddDbContext(); diff --git a/src/Ombi/StartupExtensions.cs b/src/Ombi/StartupExtensions.cs index e4dae18e4..52bc26d0d 100644 --- a/src/Ombi/StartupExtensions.cs +++ b/src/Ombi/StartupExtensions.cs @@ -2,6 +2,7 @@ using System.IO; using System.Linq; using System.Net; +using System.Reflection; using System.Security.Principal; using System.Text; using System.Threading.Tasks; @@ -11,8 +12,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.PlatformAbstractions; -using Microsoft.Extensions.Primitives; using Microsoft.IdentityModel.Tokens; using Ombi.Config; using Ombi.Core.Authentication; @@ -45,7 +44,7 @@ namespace Ombi } }); c.CustomSchemaIds(x => x.FullName); - var basePath = PlatformServices.Default.Application.ApplicationBasePath; + var basePath = Directory.GetCurrentDirectory(); var xmlPath = Path.Combine(basePath, "Swagger.xml"); try {