I need to have a SignalR server for a 32 bit application. Unfortunately the CPP Rest SDK does not offer this so I am trying to use a DotNet Framework 4.7.1 SignalR server x86 called from a 32 bit managed CLI/C++ DLL.

The DotNet app works fine using Microsoft.Owin 4.0.0 it is a minimal app with WebApp.Start<Startup>(url); a simple Startup class with app.MapSignalR(); and just an echo Send hub.

However, when I call this from the CLI/C++ I get:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.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)
at Owin.OwinExtensions.MapSignalR(IAppBuilder builder, String path, HubConfiguration configuration)

I cannot find any reference to Microsoft.Owin, Version=2.1.0.0 in the project or included files, so where is this coming from?

Steps I have tried:
1. Add a reference to Microsoft.Owin 4.0.0 to the CLI/C++ project
2. Adding a project.json to the CLI/C++ project
3. Backing down the C# application to Microsoft.Owin 2.0.0 - this gets further but starts asking for NewtonSoft.Json 4.5.0

Has anyone managed to get a SignalR server running in a 32 bit CLI/C++ environment.

Thanks for any insights