I created a local cache to use for my WPF app. when I am using visual studio 2019 in either debug or release mode the app connects to the cache and it works like a charm. but when I extract a setup file and install the app on my machine whenever the app has to connect to the Redis cache I get this exception.

The assembly for System.Buffers + System.Runtime.CompilerServices.Unsafe + System.Numerics.Vectors + System.Buffers could not be loaded; this usually means a missing assembly binding redirect - try checking this , and adding any that are missing;note that it is not always possible to add this redirects - for example 'azure functions v2' for that - sorry, but that is out of our control.

I am not using azure or any online cloud services and the cache is on my localhost. Anyone knows how to solve this?

Edit : I tried to add the missing packages from nuget to all my project files. I tried putting this in my app.config file in the Configuration Tag. still getting the exception.

      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Buffers"
              publicKeyToken="31bf3856ad364e35"
              culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.1.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe"
              publicKeyToken="31bf3856ad364e35"
              culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.7.1.0" newVersion="5.0.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Numerics.Vectors"
              publicKeyToken="31bf3856ad364e35"
              culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.5.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

Comment From: oranagra

@FardinFarnezhad i don't see how this is related to this repo (redis), you probably need to submit that some other place (WAF?)