The recommendation is to use Microsoft.AspNetCore.All
in .NET Core 2 as it simplifies dependencies and uses tree shaker magic to not bloat what you publish.
I encountered one issue of moving to it: When using a library that references StackExchange.Redis
, I ended up with a conflict as something within Microsoft.AspNetCore.All
references StackExchange.Redis.StrongName
. See question VS.NET 2017 forces using StackExchange.Redis 1.2.4.0 in ASP.NET 2.0 Core app for further info. If I stick to referencing dependencies individually then I avoid this conflict and can compile.
Other than getting conflicts between things you don't use from Microsoft.AspNetCore.All
, what are the other issues could you encounter because of this recommendation?
ASP.NET Core authorization provides a simple, declarative role and a rich policy-based model. Authorization is expressed in requirements, and handlers evaluate a user's claims against requirements.
7+ Million HTTP requests per second from a single server.
IMHO it is not a usual issue since there are not many libraries out there published twice with the same types, in two different packages: one strongly named and one not. Especially being referenced by the metapackage Microsoft.AspNetCore.All 2.0.0
You are definitely not the only one with this StackExchange.Redis
issue (I stumbled across it twice already) but the maintainers are planning to drop the StrongName
package on version 2.0.
You can try dealing with it with the extern alias
approach discussed here.
A quick way around it is to target the same package AspNetCore targets (the StrongName one). In case it's just a project within a solution you work with, it's an easy hack.
Another is to target Microsoft.Extensions.Caching.Redis
. That's what the metapackage depends on.
That's until SE.Redis releases version 2.0.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With