Closed larsfjerm closed 7 years ago
We can fix it for 1.5.1.
It is caused by a breaking change in Asp.Net DI and we've to rebuild Orleans using the 2.0 version once it will be released.
But it will be a mandatory upgrade to every Orleans consumer then.
We shouldn't change dependencies, especially those with a breaking change, in a patch release. So 2.0 is the vehicle to change this I think.
Are we the only consumers of these Microsoft.Extensions.* pieces? It seems like they made this change without us being aware about it and there's no way we (as a library) can support versions pre- and post- change simultaneously.
I don't think so that we're the only users:
That's the first 100 package which depends on DI Abstractions, but I think this breaking change is only for those who use their DI implementation...not for the abstraction
Can't the dependency injection be abstracted away in it's own package, which can be replaced w/o directly referencing from Orleans?
I mean instead of Orleans.Runtime depending on M.E.DI, it could only depend on IServiceProvider
(it's an interface that existed in .NET Framework for a long time) and have the start-class and the DI stuff in external package?
So we could then reference it like
<PackageReference Include="Microsoft.Orleans.OrleansRuntime" Version="1.5.0" />
<PackageReference Include="Microsoft.Orleans.Orleans.DependencyInjection" Version="2.0.0" />
or
<PackageReference Include="Microsoft.Orleans.Orleans.DependencyInjection" Version="1.1.1" />
Whereas the Microsoft.Orleans.Orleans.DependencyInjection
package would contain everything required for bootstrapping Startup.cs
and building of the container?
Within the runtime itself, there is no need for the M.E.DI package and IServiceProvider.GetService(Type type)
should be enough, right?
I'm closing this, since we've talked about this and, because we need to provide a default implementation of DI fully configured for Orleans 1.x and Microsoft.Extensions.DependencyInjection 2.0+ we've to say that they're incompatible. For Orleans 2.0+ it will not be an issue.
Seems to be breaking change in
Microsoft.Extensions.DependencyInjection
v2.0.0 where the BuildServiceProvider method has changed its return type fromIServiceProvider
toServiceProvider
.MethodNotFoundException is being thrown when I'm using a Startup class.
Related: https://github.com/aspnet/DependencyInjection/issues/550