You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Microsoft.AspNet.OData.Shared/DefaultContainerBuilder.cs
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -87,8 +87,14 @@ public virtual IServiceProvider BuildContainer()
87
87
{
88
88
returnservices.BuildServiceProvider();
89
89
}
90
-
catch
90
+
catch(MissingMethodException)
91
91
{
92
+
/* "services.BuildServiceProvider()" returns IServiceProvider in Microsoft.Extensions.DependencyInjection 1.0 and ServiceProvider in Microsoft.Extensions.DependencyInjection 2.0
93
+
* * (This is a breaking change)[https://github.com/aspnet/DependencyInjection/issues/550].
94
+
* To support both versions with the same code base in OData/WebAPI we decided to call that extension method using reflection.
95
+
* More info at https://github.com/OData/WebApi/pull/1082
0 commit comments