File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
34
34
``` C#
35
35
public static IHostBuilder CreateHostBuilder (string [] args ) =>
36
36
Host .CreateDefaultBuilder (args )
37
- .UseUnityServiceProvider (_container ) < ---- Add this line
37
+ .UseUnityServiceProvider (_container ) // <---- Add this line
38
38
.ConfigureWebHostDefaults (webBuilder =>
39
39
{
40
40
webBuilder .UseStartup <Startup >();
@@ -59,7 +59,9 @@ By default ASP resolves controllers using built in activator. To enable resoluti
59
59
public void ConfigureServices (IServiceCollection services )
60
60
{
61
61
.. .
62
- services .AddControllersAsServices (); < -- Add this line
62
+ services .AddMvc ()
63
+ .AddControllersAsServices () // <-- Add this line
64
+ .SetCompatibilityVersion (CompatibilityVersion .Version_3_0 )
63
65
.. .
64
66
}
65
67
```
You can’t perform that action at this time.
0 commit comments