1. I'm trying to use Signalr to exchange data with a local instance of IIS runing a simple webapp to exchange data. I have been trying to solve an error i have been getting since moving to .Net 4.6 as with the move to this version on oxide.rust. I seem to be getting these errors whenever my extensions or its dependencies depends on a System. assembly. The error i'm getting.

    Code:
    Could not load type of field 'Microsoft.AspNet.SignalR.Client.Http.DefaultHttpClient:_longRunningClient' (0) due to: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:(null) signature:<none>
    The strange thing is that in the app.config, the library should be referencing version 4.1.1.2, yet placing both version 4.0.0.0 and version 4.1.1.2 doesn't seem to solve the issue.

    I completely removed every single reference to every assembly, cleared the package.config and added them one by one but there was no success. StackOverflow comments are suggesting it could be trying to Oxide loading the wrong assembly? As far as i'm aware, oxide doesn't reference System.Net.Http nor should the game so there shouldn't be colliding versions right?
     
  2. Wulf

    Wulf Community Admin

    Looks like your extension is targeting a different version of .NET than what Rust/Unity has available. This wouldn't be related to Oxide itself. When you compile an extension, you're using whatever references are setup there in your IDE, so that may vary if you are referencing files different than what the game provides. Rust uses Unity, which uses Mono, so if your system is using Microsoft .NET instead of Mono, it may vary slightly based on what is available to it on the server itself.
     
  3. Oxide.Rust targets .net framework 4.6 which is what my extension targets, which version should i target?
     
  4. Wulf

    Wulf Community Admin

    Oxide.Rust targets .NET 4.6, but your issue is with the other references that are using, not that.

    Your code is looking for 'Microsoft.AspNet.SignalR.Client.Http.DefaultHttpClient:_longRunningClient' which doesn't exist in Mono. So you'd need to figure out where that is coming from and change it to one that is included in Mono.