Hangfire.Redis.StackExchange icon indicating copy to clipboard operation
Hangfire.Redis.StackExchange copied to clipboard

Please update StrongName nuget package to same as non-signed one

Open xumix opened this issue 6 years ago • 5 comments

subj, cant use non-strongname one because of Signalr.redis

xumix avatar Mar 05 '18 13:03 xumix

+1, because Microsoft.AspNetCore.All => Microsoft.Extensions.Caching.Redis (2.0.1) => StackExchange.Redis.StrongName (1.2.4)

gzpbx avatar Mar 28 '18 05:03 gzpbx

The problem also occurs when using the Microsoft.AspNetCore.App package, which is now included by default in ASP.NET Core 2.1 projects.

A fix to this issue would be much appreciated.

sebastianbk avatar Jul 01 '18 20:07 sebastianbk

I think this update is important because of the backwards-incompatible nature of the SE.Redis update I talked about in https://github.com/marcoCasamento/Hangfire.Redis.StackExchange/pull/78#issuecomment-429915281

I'm on ASP.NET Core 2.1.x don't want to upgrade fully to SE.Redis 2.x yet, but I would like the fixes from the latest version of this package :)

In the meantime, I am using this as a workaround (add it as a child beneath the <Project> tag):

  <Target Name="ChangeAliasesOfStrongNameAssemblies" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
    <ItemGroup>
      <ReferencePath Condition="'%(FileName)' == 'StackExchange.Redis.StrongName'">
        <Aliases>signed</Aliases>
      </ReferencePath>
    </ItemGroup>
  </Target>

This fixes the build errors, but causes any file that has using StackExchange.Redis to give this Intellisense error:

The type 'ConnectionMultiplexer' exists in both 'StackExchange.Redis.StrongName, Version=1.2.6.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46' and 'StackExchange.Redis, Version=1.2.6.0, Culture=neutral, PublicKeyToken=null'

If we are able to upgrade to the latest version of the strongname version of this package, the issue will go away completely.

alecgorge avatar Oct 15 '18 16:10 alecgorge

Update: I was able to fix this by referencing Microsoft.AspNetCore.App instead of Microsoft.AspNetCore.All as suggested in https://github.com/StackExchange/StackExchange.Redis/issues/697#issuecomment-391131108

After I did that I had to add in a few dependencies I was missing that were in .All but not .App. After that, I was able to remove the .csproj fix I posted above because I wasn't using any of the ASP.NET Core features that depended on SE.Redis and now I only had the non-StrongName reference.

Anyone who uses SignalR, etc will still need that fix.

alecgorge avatar Oct 15 '18 16:10 alecgorge

https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis/ https://www.nuget.org/packages/Microsoft.AspNetCore.SignalR.StackExchangeRedis/ @alecgorge @sebastianbk @gzpbx @xumix

frankyjquintero avatar Nov 19 '21 17:11 frankyjquintero