-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
- Create .Net Core 2.2 Web App:
dotnet new webapp - Add NuGet Package:
Install-Package Unity.Microsoft.DependencyInjection - Customize Program:
WebHost.CreateDefaultBuilder(args) .UseUnityServiceProvider() .UseStartup<Startup>(); - Customize Startup:
services.AddMvc() .SetCompatibilityVersion(CompatibilityVersion.Version_2_2) .AddControllersAsServices(); - Run:
dotnet run
I have got:
Application startup exception: System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.Reverse[TSource](IEnumerable1 source) at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6] Application startup exception System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.Reverse[TSource](IEnumerable1 source)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.Reverse[TSource](IEnumerable`1 source)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
at _3.Program.Main(String[] args) in D:\TEMP\3\Program.cs:line 18
A similar problem is described here: #17
What have i done wrong?
FYI:
i have the problem with 5.9.2. (current release)
but not with 5.9.0.