From bd179b15a299bf9e04d062f975a4a91f96523c88 Mon Sep 17 00:00:00 2001 From: Steve Mulholland Date: Fri, 11 Jan 2019 23:00:08 -0800 Subject: [PATCH 1/5] Migrates to 2.2 --- global.json | 5 +++++ src/Miniblog.Core.csproj | 15 ++++++++------- src/Startup.cs | 9 +++++++-- 3 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 global.json diff --git a/global.json b/global.json new file mode 100644 index 00000000..a4a01b22 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "2.2.100" + } +} \ No newline at end of file diff --git a/src/Miniblog.Core.csproj b/src/Miniblog.Core.csproj index c8ce56de..368d32c3 100644 --- a/src/Miniblog.Core.csproj +++ b/src/Miniblog.Core.csproj @@ -1,21 +1,22 @@ - + - netcoreapp2.1 + netcoreapp2.2 + InProcess - + - + - + - + - + diff --git a/src/Startup.cs b/src/Startup.cs index c5eb4189..15d7a5d4 100644 --- a/src/Startup.cs +++ b/src/Startup.cs @@ -8,6 +8,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Console; using Miniblog.Core.Services; using WebEssentials.AspNetCore.OutputCaching; using WebMarkupMin.AspNetCore2; @@ -35,7 +37,7 @@ public static void Main(string[] args) public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup() - .UseKestrel(a => a.AddServerHeader = false); + .ConfigureKestrel(a => a.AddServerHeader = false); public IConfiguration Configuration { get; } @@ -43,13 +45,16 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args) => public void ConfigureServices(IServiceCollection services) { services.AddMvc() - .SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + .SetCompatibilityVersion(CompatibilityVersion.Version_2_2); services.AddSingleton(); services.AddSingleton(); services.Configure(Configuration.GetSection("blog")); services.TryAddSingleton(); services.AddMetaWeblog(); + services.AddLogging(builder => builder + .AddConsole() + .AddFilter(category: null, level: LogLevel.Information)); // Progressive Web Apps https://github.com/madskristensen/WebEssentials.AspNetCore.ServiceWorker services.AddProgressiveWebApp(new WebEssentials.AspNetCore.Pwa.PwaOptions From 1df697bf994b0cb5c24d8793426d256f8b4daa56 Mon Sep 17 00:00:00 2001 From: Steve Mulholland Date: Fri, 11 Jan 2019 23:16:58 -0800 Subject: [PATCH 2/5] Removes unnecessary upgrades --- global.json | 5 ----- src/Miniblog.Core.csproj | 9 ++++----- src/Startup.cs | 3 --- 3 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 global.json diff --git a/global.json b/global.json deleted file mode 100644 index a4a01b22..00000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "2.2.100" - } -} \ No newline at end of file diff --git a/src/Miniblog.Core.csproj b/src/Miniblog.Core.csproj index 368d32c3..fa67d851 100644 --- a/src/Miniblog.Core.csproj +++ b/src/Miniblog.Core.csproj @@ -2,21 +2,20 @@ netcoreapp2.2 - InProcess - + - + - + - + diff --git a/src/Startup.cs b/src/Startup.cs index 15d7a5d4..e1ab9733 100644 --- a/src/Startup.cs +++ b/src/Startup.cs @@ -52,9 +52,6 @@ public void ConfigureServices(IServiceCollection services) services.Configure(Configuration.GetSection("blog")); services.TryAddSingleton(); services.AddMetaWeblog(); - services.AddLogging(builder => builder - .AddConsole() - .AddFilter(category: null, level: LogLevel.Information)); // Progressive Web Apps https://github.com/madskristensen/WebEssentials.AspNetCore.ServiceWorker services.AddProgressiveWebApp(new WebEssentials.AspNetCore.Pwa.PwaOptions From 23008cfd062e0e35b10469d6b125136f2976f2cf Mon Sep 17 00:00:00 2001 From: Steve Mulholland Date: Fri, 11 Jan 2019 23:20:19 -0800 Subject: [PATCH 3/5] Adopts the IIS in-process hosting model --- src/Miniblog.Core.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Miniblog.Core.csproj b/src/Miniblog.Core.csproj index fa67d851..1df3faef 100644 --- a/src/Miniblog.Core.csproj +++ b/src/Miniblog.Core.csproj @@ -2,6 +2,7 @@ netcoreapp2.2 + InProcess From 56ea2ca69fbb8711a8f9c54ba437dbbd6a9e767d Mon Sep 17 00:00:00 2001 From: Steve Mulholland Date: Fri, 11 Jan 2019 23:32:54 -0800 Subject: [PATCH 4/5] Updates logging code --- src/Startup.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Startup.cs b/src/Startup.cs index e1ab9733..15d7a5d4 100644 --- a/src/Startup.cs +++ b/src/Startup.cs @@ -52,6 +52,9 @@ public void ConfigureServices(IServiceCollection services) services.Configure(Configuration.GetSection("blog")); services.TryAddSingleton(); services.AddMetaWeblog(); + services.AddLogging(builder => builder + .AddConsole() + .AddFilter(category: null, level: LogLevel.Information)); // Progressive Web Apps https://github.com/madskristensen/WebEssentials.AspNetCore.ServiceWorker services.AddProgressiveWebApp(new WebEssentials.AspNetCore.Pwa.PwaOptions From 09739fe280dd9b3a8e057f17b8913e7627b0cec1 Mon Sep 17 00:00:00 2001 From: Matt Lavallee Date: Wed, 13 Mar 2019 15:16:22 -0700 Subject: [PATCH 5/5] Update src/Miniblog.Core.csproj Co-Authored-By: smulholland2 --- src/Miniblog.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Miniblog.Core.csproj b/src/Miniblog.Core.csproj index 1df3faef..014550a2 100644 --- a/src/Miniblog.Core.csproj +++ b/src/Miniblog.Core.csproj @@ -9,7 +9,7 @@ - +