Support Topics Documentation Slack YouTube Blog

An unhandled exception of type 'System.IO.FileLoadException' occurred in Backendless.dll


(Mendelson Dalpakim) #1

I’m getting this error:
Additional information: Could not load file or assembly ‘System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
when I’m trying to run this code in C#
IEventHandler userEventhandler = Backendless.Data.Of().RT();
** userEventhandler.AddUpdateListener(“filename != ‘’”, updatedUser =>**
** {**
** MessageBox.Show(“something happend”);**
** });**


(Oleg Vyalyh) #2

Hi.
I’ve created inner task (BKNDLSS-18087) to investigate the problem.
All information about progress will be posted here.


(Mendelson Dalpakim) #3

Hey,

Is there any progress?


(Vladimir Yalovy) #4

Hi, Mendelson Dalpakim

Not yet. We’ll notify you as soon as the issue is resolved


(Mark Piller) #5

Hi @mendelson_dalpakim,

What version of the .NET SDK and what version of the .NET framework do you use?

Regards,
Mark


(Mendelson Dalpakim) #6

.NET Framework 4.7.2
.NET SDK 5.1.5.0


(Mendelson Dalpakim) #7

Hey guys,

Is there any progress? I’m kind of stuck here with my work…


(Vladimir Yalovy) #8

Hi, @mendelson_dalpakim

Not yet. We are working on this task. We’ll notify you as soon as the issue is resolved


(Mark Piller) #9

Hey @mendelson_dalpakim,

I created a ConsoleApplication using .NET 4.7:

I added the Backendless package from NuGet. Here’s a list of all dependencies which came with it:
cs%20%E2%80%93%20Visual%20Studio%20Community%202017%20for%20Mac%202019-02-21%2020-10-13

The code is trivially simple:

using System;
using BackendlessAPI;

namespace RTTest
{
  class MainClass
  {
    public static void Main( string[] args )
    {
      Backendless.InitApp( "F632EF89-D87C-8E34-FF81-0E72A4F14600", "MY-DOTNET-API-KEY-IS-HERE" );
      Backendless.RT.AddConnectErrorListener( ( fault ) =>
       {
         Console.WriteLine( fault.Message );
       } );

      Backendless.RT.AddConnectListener( () =>
      {
        Console.WriteLine( "Connected to RT" );
      } );

      Backendless.Data.Of( "Person" ).RT().AddUpdateListener( ( obj ) =>
       {
         Console.WriteLine( "object updated" );
       } );

      Console.ReadLine();
    }
  }
}

When I run the code, I get the following:

BACKENDLESS LOG:try to subscribe RTSubscription{id='d3e0f6ad-71c1-44d7-b819-8295f811982a', callback=BackendlessAPI.RT.RTCallback`1[System.Collections.Generic.Dictionary`2[System.String,System.Object]], subscriptionName=OBJECTS_CHANGES, options=System.Collections.Generic.Dictionary`2[System.String,System.Object]}
BACKENDLESS LOG:Connected event 
BACKENDLESS LOG:subOn called
Connected to RT

Then I update an object with a REST API call and I get the following output:

BACKENDLESS LOG:Got sub res
BACKENDLESS LOG:Got result for subscription d3e0f6ad-71c1-44d7-b819-8295f811982a
object updated

I’ll be happy to share the project with you, if you’d like.

Regards,
Mark


(Mendelson Dalpakim) #10

Hey Mark,

I tried creating the same project myself, still didn’t work for me.
Please share your project with me and maybe I’ll find the problem.

Thank You.


(Mark Piller) #11

Hello,

You can download the project from here:

Make sure to restore the packages, I excluded them from the archive to keep it smaller.

Regards,
Mark


(Mendelson Dalpakim) #12

I don’t know why but the problem was with my Visual Studio.
I usually using Visual Studio 2013 Ultimate, I downloaded Visual Studio 2017 Community and after downloading all dependencies it worked.
For some reason 2013 didn’t add all dependencies and I couldn’t add manually.

Thanks for your help!