StackExchange / StackExchange.Redis

General purpose redis client
https://stackexchange.github.io/StackExchange.Redis/
Other
5.87k stars 1.51k forks source link

'StackExchange.Redis #2532

Closed ShivaniY4W closed 1 year ago

ShivaniY4W commented 1 year ago

Severity Code Description Project File Line Suppression State Error CS0433 The type 'ConnectionMultiplexer' exists in both 'StackExchange.Redis.StrongName, Version=1.2.6.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46' and 'StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46' y4w C:\Users\DELL\Desktop\y4w Packages\git\Y4Wmain\Concrete\YUtitlity.cs 62 N/A

mgravell commented 1 year ago

The message says it all: you're referencing (either directly or transitively) two different packages with the SE.Redis core. The preferred option is to unify that down to just StackExchange.Redis (which has been strong named for "quite some time") and discard StackExchange.Redis.StrongName (which is no longer maintained, and is marked as deprecated on nuget). Worst case, you can use "extern alias" to keep both and tell the compiler which you mean at any point. But that is not the recommended option.

NickCraver commented 1 year ago

What Marc said :) Closing out to tidy up!