From 28922d16c7b015f53984136c34936c74320c9153 Mon Sep 17 00:00:00 2001 From: Bart de Bever Date: Tue, 24 Nov 2020 13:51:32 +0100 Subject: [PATCH] Update the README for .NET 5.0 --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 205615f..e75acc9 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) => ```C# public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .UseUnityServiceProvider(_container) <---- Add this line + .UseUnityServiceProvider(_container) //<---- Add this line .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); @@ -59,7 +59,9 @@ By default ASP resolves controllers using built in activator. To enable resoluti public void ConfigureServices(IServiceCollection services) { ... - services.AddControllersAsServices(); <-- Add this line + services.AddMvc() + .AddControllersAsServices() //<-- Add this line + .SetCompatibilityVersion(CompatibilityVersion.Version_3_0) ... } ```