When you request a service from the built service provider it will give you the last service added, not the first one. This method should mimic the DI behavior.
This issue doesn't generally affect user scenarios today, because this method is used to extract the hosting environment service and there is typically only one of those. I hit this issue as part of my module prototyping when I added a new hosting environment for each module. The added hosting environment should override the existing one, but currently it doesn't because this method picks the first instead of the last. I'm working around this right now by simply removing the app hosting environment for each module and then replacing it with a new one.
The text was updated successfully, but these errors were encountered:
Eilon commentedNov 21, 2016
This line:
https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Core/DependencyInjection/MvcCoreServiceCollectionExtensions.cs#L90
Per @danroth27 :
The text was updated successfully, but these errors were encountered: