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) =>
3434``` C#
3535public static IHostBuilder CreateHostBuilder (string [] args ) =>
3636 Host .CreateDefaultBuilder (args )
37- .UseUnityServiceProvider (_container ) < ---- Add this line
37+ .UseUnityServiceProvider (_container ) // <---- Add this line
3838 .ConfigureWebHostDefaults (webBuilder =>
3939 {
4040 webBuilder .UseStartup <Startup >();
@@ -59,7 +59,9 @@ By default ASP resolves controllers using built in activator. To enable resoluti
5959public void ConfigureServices (IServiceCollection services )
6060{
6161 .. .
62- services .AddControllersAsServices (); < -- Add this line
62+ services .AddMvc ()
63+ .AddControllersAsServices () // <-- Add this line
64+ .SetCompatibilityVersion (CompatibilityVersion .Version_3_0 )
6365 .. .
6466}
6567```
You can’t perform that action at this time.
0 commit comments