locked
Error loading Owin DLL RRS feed

  • Question

  • User783240086 posted

    Project was working fine. Updated all the Owin and SignalR DLLs with Nuget and now I get this error when calling .MapSignalR() in the OwinConfig:

    System.IO.FileLoadException occurred
      HResult=0x80131040
      Message=Could not load file or assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
      Source=Microsoft.AspNet.SignalR.Core
      StackTrace:
       at Owin.OwinExtensions.MapSignalR(IAppBuilder builder, String path, HubConfiguration configuration)
       at Owin.OwinExtensions.MapSignalR(IAppBuilder builder, HubConfiguration configuration)
       at Owin.OwinExtensions.MapSignalR(IAppBuilder builder)
       at RRAutoLib.Remoting.OwinConfig.Configuration(IAppBuilder objApp) in D:\Dev\Projects\RRAuto\RRAutoLib\Remoting.vb:line 269

    Inner Exception 1:
    FileLoadException: Could not load file or assembly 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Not sure why the outer error mentions v3.0.1.0 of the lib (which is the correct referenced version) while the inner exception mentions v2.1.0.0. There are no references to v2.1.0.0 in my project.

    Wednesday, June 28, 2017 8:50 PM

Answers

  • User783240086 posted

    Never mind, I figured it out.

    The nuget package seems to only update the <bindingRedirect> tags in my library DLL project that references the Microsoft.Owin.dll but not in the project that consumes my DLL library. Apparently you have to manually add the binding redirects in all the consumer projects too. I don't get why this is necessary when my DLL service already specifies the redirects but when you do the redirects in all of those too then it works.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 29, 2017 3:35 AM