Search Unity

Unloading broken assembly ?.dll, this assembly can cause crashes in the runtime

Discussion in 'Experimental Scripting Previews' started by AVOlight, Feb 10, 2018.

  1. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    397
    Last edited: Feb 11, 2018
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    You may want to submit a different bug report with the assemblies or code that causes the problem in this case. I'm not sure about the specific cause for this Google.Api.Gax.Grpc code, but we can investigate.
     
    AVOlight likes this.
  3. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    397
    Thank you

    There are a lot of dependencies so I think it's best to stay away from the source and stick with nuget managing the packages.

    Also get "Loading script assembly "Assets/Plugins/System.Net.Http.dll" failed!"
    System.Net.Http (>= 4.3.1)

    when targeting android there doesn't seem to be a way to reference the version that's part of the Unity installation
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    I would recommend avoiding copying class library assemblies into the project directory. You should be able to reference them in your build with an mcs.rsp file. You can add on to the Assets/ directory of the project with these contents:

    -r:System.Net.Http.dll

    That should work properly with the .NET 4.x profile.
     
    AVOlight likes this.
  5. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    397
    @JoshPeterson Thank you it worked! :) That's very good to know

    now its just the one error
    "Unloading broken assembly Library/ScriptAssemblies/Assembly-CSharp.dll, this assembly can cause crashes in the runtime"
    instead of pointing to all the packages that are marked "broken assembly", i've just merged them into 1 using the source

    so would it be easier to solve the "Unloading broken assembly" with the source? should i submit it even though it might have different issues because of the code version downgrade
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    I don't think it would be easier one way or another. We should be able track down the cause of the problem either with source code or with an assembly.
     
    AVOlight likes this.
  7. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    397
  8. N3uRo

    N3uRo

    Joined:
    Dec 10, 2011
    Posts:
    592
    mcs.rsp can only be in root folder? Because sometimes we would want to have dependencies separated in a logical structure like modules. So we can separate that -r dependencies.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    Yes, right now we only pick up one mcs.rsp file in the Assets folder of the project, unfortunately. This would be a nice feature though. I suspect it might be possible to aggregate all of mcs.rsp files in a project with an editor script.
     
  10. N3uRo

    N3uRo

    Joined:
    Dec 10, 2011
    Posts:
    592
    Are you then considering it?

    For example, link.xml works like that, you can have multiple files across hierarchy and they are merged together.
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    It is not something we are actively working on. We might do it in the future, but I doubt it will be soon.
     
  12. N3uRo

    N3uRo

    Joined:
    Dec 10, 2011
    Posts:
    592
    I don't understand how it will merge with nuget support that we saw in a Microsoft Youtube video when they said that it was on 2018 roadmap to get Unity VS Tools nuget support.
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    I'm not sure about that either. From the Unity side, we're not planning nuget support. Microsoft might be planning to do that from the Visual Studio side though. I would expect that Visual Studio might write a combined mcs.rsp into the Unity project in that case. But I don't have any specific knowledge about this.
     
  14. N3uRo

    N3uRo

    Joined:
    Dec 10, 2011
    Posts:
    592
    If you want more info on this:

     
  15. JaredThirsk

    JaredThirsk

    Joined:
    Jan 17, 2010
    Posts:
    38
    @JoshPeterson, is there any way for us users to determine why we are getting the "Unloading broken assembly ..., this assembly can cause crashes in the runtime"?

    I can share my code with you (an open source NetStandard2.0 DLL) if that would help but I would like to understand what breaks Unity and what doesn't, so I can know what my options are.
     
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    Unfortunately, that error message is pretty opaque. I'm not even sure about all of the cases that cause it! I think it means that the assembly (or one of its dependencies) could not be loaded. If you can provide a project that reproduces the issue in a bug report, I think we can provide more details. Hopefully we can also improve the error message.
     
  17. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    619
    we are having the same issue and you can repro it easily using the .net standard (1.3) version of log4net.dll. For us it always results in

    Unloading broken assembly Assets/Assemblies/Log4Net/log4net.dll, this assembly can cause crashes in the runtime

    which it means that we cannot use .net standard 2.0 with log4net. It may be due to external dependencies log4net needs.

    @JoshPeterson It may be the same reason why IL2CPP linking was failing (if you remember what I am talking about)
     
    Last edited: Jun 7, 2018
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    @sebas77

    Can you drop us a bug report, so that we have have the exact project, Unity version number, etc?
     
  19. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    619
    ok I will try to create a simple project using that dll
     
    JoshPeterson likes this.
  20. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    619
  21. RodrigoAbreu

    RodrigoAbreu

    Joined:
    Jan 29, 2013
    Posts:
    3
    The only reason why an external dll complains with "Unloading broken assembly" is because you may not have imported the dependency dlls with it.
    For example, if you try to use GraphQL and/or GraphQLParser it may start exploding the message above as a way to say that it's missing Newtonsoft.Json, the message is just not really clear, I know but but always try to check original .net (C#) project to see the dependency libraries used by it and make sure to import them as well, but only if they're not part of the standard C# libraries or if the assetstore doesn't have it yet, as in the case of Newtonsoft.Json.
     
    remi-sormain-viond likes this.
  22. nupur7

    nupur7

    Joined:
    Feb 15, 2017
    Posts:
    9
    I m also facing the same issue unloading broken assembly..can crash at runtime
    I am trying to receive data from azure event hub to unity. .For that i have downloaded azure eventhub processor nuget package, out of which i have copied dll into asset folder but getting the error mentioned above.
    Anyone has found the solution? Thanks in advance
     
  23. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    @nupur7

    Do you know if this DLL from nuget was compiled against .NET Core? If so, that might cause this issue, as .NET Core assemblies are not supported in Unity.
     
  24. InvarJasonPelgen

    InvarJasonPelgen

    Joined:
    Mar 7, 2018
    Posts:
    4
    I am trying to import a *.dll file to the plugins folder. I changed the runtime version to .NET 4.x and API compatibility to .NET 4.x in the editor, as my file uses .NET 4.6. But once this is all said and done, i get the error "Unloading broken assembly Assets/Plugins/Invar.Core.dll, this assembly can cause crashes in the runtime". If I'm using the proper compatibility, why is this still occurring?

    I've also tried creatign a *.txt file, renaming it to mcs.rsp and putting -r:Invar.Core.dll as my reference. and unity barks back "error CS0006: Metadata file `Invar.Core.dll' could not be found."
     
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    Unfortunately, the "Unloading broken assembly" error is a bit opaque, and does not give much information about the cause of the problem. I don't think a .rsp file is necessary in this case though.

    Do you know how your Invar.Core.dll assembly was compiled? Was it built against the .NET 4.6 Framework? If it was built against .NET Core, for example, it won't work with Unity.
     
  26. InvarJasonPelgen

    InvarJasonPelgen

    Joined:
    Mar 7, 2018
    Posts:
    4
    It was built against .NET 4.6. It's been a hair-pulling week haha! But was what I described before the correct way to reference a *.dll? I'm a newbie haha.
     
  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    Can you drop it into a tool like ILSpy and look at its references? Maybe it references something that Unity does not.
     
  28. InvarJasonPelgen

    InvarJasonPelgen

    Joined:
    Mar 7, 2018
    Posts:
    4
    Ok, Target framework is v4.0. As for the references:


    using System.Diagnostics;
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;
    using System.Runtime.Versioning;
     
  29. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    I think these are namespaces, but not assembly references. You should see something like mscorlib.dll, System.dll, etc. In the assembly references.
     
  30. InvarJasonPelgen

    InvarJasonPelgen

    Joined:
    Mar 7, 2018
    Posts:
    4
    Apologies! didn't even notice the references folder in the left panel. Made a screen cap of the list of references.
     

    Attached Files:

  31. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    This is definitely built against the .NET Framework. I'm not sure about a few of the references though, most notably IronPython. I'm not sure that Unity supports that. Can you submit a bug report with this project? Maybe we can dig into that error message and get you better, more specific feedback.
     
  32. N3uRo

    N3uRo

    Joined:
    Dec 10, 2011
    Posts:
    592
    Do you have plans on giving a more descriptive error details like what assemblies are not included? When we make a build it throws a more detailed error for example.
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    We have some improvements to this error message on the way, but we still don't give full information about the cause of the assembly loading problem. That is something we plan to do in the future though.
     
  34. rklausch

    rklausch

    Joined:
    Jun 5, 2016
    Posts:
    10
    Same issue here for any MongoDB database drivers higher that version 2.4.4 (which interestingly works fine) ...

    all these driver versions 2.x are supporting .NET 4.5+ and .NET Standard 1.5+ (see compatibility list here: https://docs.mongodb.com/ecosystem/...ibility-reference/#c-net-driver-compatibility

    After importing the driver dlls, Unity 2018.2.6f1 is giving the following error:
    Unloading broken assembly Assets/MongoDBDriver2.5/MongoDB.Driver.Core.dll, this assembly can cause crashes in the runtime

    you can download the driver here for investigation of the issue: https://github.com/mongodb/mongo-csharp-driver/releases/download/v2.5.1/CSharpDriver-2.5.1.zip

    See also here the changes made for the first non-working driver version (2.5.1): http://mongodb.github.io/mongo-csharp-driver/2.5/what_is_new/

    i defintiely don't think, that this assembly is using external references apart from .NET 4.5+ standard libraries...so what could be the reason here? I'd say that mongodb is becoming a very often used way of persisting game states over the last years, so i'd be glad if i could use updated drivers in Unity as well.

    Thanks again in advance for your help @JoshPeterson !
     
    Last edited: Oct 24, 2018
  35. rklausch

    rklausch

    Joined:
    Jun 5, 2016
    Posts:
    10
    i found a solution for the mentioned problem above by compiling my own driver directly from the source, which actually is containing two more referenced dll's ( in my case this is DnsClient.dll and System.Buffers.dll) which seems to be not getting referenced by the newer driver versions and are not natively referenced into a Unity3D project by itself. On the other hand, they are not included in the driver package for some reasons.

    New driver runs perfectly now. :)
     
    Last edited: Oct 24, 2018
    JoshPeterson likes this.
  36. cap_L

    cap_L

    Joined:
    Jul 11, 2018
    Posts:
    3
    Hello all,
    I am developing an application using Unity which uses BioRadioSDK. When i run it in visual studio it works fine, but when i run in Unity, I get this error: "Unloading broken assembly Assets/Plugins/x64/BioRadioSDK.dll, this assembly can cause crashes in the runtime".

    My visual studio version uses .NET framework 4.5. I have already changed **Scripting Runtime Version to ".NET 4.x Equivalent" in the PlayerSettings (Edit menu/Project Settings/Player**. **I have also already added mcs.rsp file within the assets folder.** I do not know how to fix this error. Please provide suggestions. @JoshPeterson
     
  37. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    Can you try this with Unity 2018.3? The error message has been improved in that version of Unity, so you might get some additional insight into the cause of the issue.
     
  38. cap_L

    cap_L

    Joined:
    Jul 11, 2018
    Posts:
    3
    Hello @JoshPeterson, I used MonoDevelop instead of Visual studio. For that i had to downgrade my Unity. It stops displaying that error however there is another error of Socket exception. Do you have any idea what is going on ? I looked out in the internet. The error messages is same as "The operation completed successfully" but the full description is very different. Would you help me with this ?

    Again, it works well with Visual studio. It connects with the Bluetooth and receives data but does not work when integrated with Unity. Is there the version problem or something ? Please help me find solutions. It is very important for my research.

    SocketException: The operation completed successfully.

    System.Net.Sockets.Socket..ctor (System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) (at <a3bc56cd038446b2ba8027b187001bf8>:0)
    InTheHand.Net.Bluetooth.Msft.SocketBluetoothClient.CreateSocket () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    InTheHand.Net.Bluetooth.Msft.SocketBluetoothClient..ctor (InTheHand.Net.Bluetooth.Factory.BluetoothFactory fcty) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    Rethrow as PlatformNotSupportedException: 32feet.NET does not support the Bluetooth stack on this device.
    InTheHand.Net.Bluetooth.Msft.SocketBluetoothClient..ctor (InTheHand.Net.Bluetooth.Factory.BluetoothFactory fcty) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    InTheHand.Net.Bluetooth.SocketsBluetoothFactory.GetBluetoothClient () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    InTheHand.Net.Bluetooth.Factory.BluetoothFactory.DoGetBluetoothClient () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    InTheHand.Net.Sockets.BluetoothClient..ctor (InTheHand.Net.Bluetooth.Factory.BluetoothFactory factory) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    InTheHand.Net.Sockets.BluetoothClient..ctor () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.Common.TransportLayer.BluetoothTransport.OpenConnection () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.Common.TransportLayer.HardwareLinkHandler.Open () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.Common.DaqDevice.Connect () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.BioRadio.BioRadioDevice.Connect () (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.BioRadio.BioRadioDevice.InitializeSignalGroups (System.Nullable`1[T] signalBufferSize) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.Common.DaqDevice..ctor (GLNeuroTech.Devices.Common.TransportLayer.HardwareLinkHandler hardwareLink, System.String name, System.Nullable`1[T] signalBufferSize) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.BioRadio.BioRadioDevice..ctor (GLNeuroTech.Devices.Common.TransportLayer.HardwareLinkHandler connection, System.String name) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    GLNeuroTech.Devices.BioRadio.BioRadioDeviceManager.GetBluetoothDevice (System.Int64 macID) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    Rethrow as Exception: Unable to connect to specified address.
    GLNeuroTech.Devices.BioRadio.BioRadioDeviceManager.GetBluetoothDevice (System.Int64 macID) (at <32a659c7eee24e9faa8711d5d2b4272b>:0)
    Acquire.Update () (at Assets/Scripts/Acquire.cs:65)
     
    Last edited: Nov 6, 2018
  39. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,570
    I'm not sure what is causing this issue. Since the behavior is different from .NET, it might be worth submitting a bug report to Unity. The behavior of Unity probably should match .NET in this case.
     
  40. JeffreyStrate

    JeffreyStrate

    Joined:
    Jul 27, 2016
    Posts:
    7
    Irgend eine C# Datei hat ein Programmierfehler, der das ganze Unity kapput macht Löschen und Neustarten
     
  41. Onsterion

    Onsterion

    Joined:
    Feb 21, 2014
    Posts:
    209
    Same problem with MongoDB.Driver.Core 2.7.2

    Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors:
    Reference has errors 'MongoDB.Driver.Core'.

    Assembly 'Assets/[Database]/Plugins/MongoDB.Driver.Core.dll' will not be loaded due to errors:
    Unable to resolve reference 'DnsClient'. Is the assembly missing or incompatible with the current platform?

    Assembly 'Assets/[Database]/Plugins/MongoDB.Driver.dll' will not be loaded due to errors:
    Reference has errors 'MongoDB.Driver.Core'.


    Downloaded from https://github.com/mongodb/mongo-csharp-driver/releases

    Unity version: 2018.3.0f2

    Any suggestion?
     
    Last edited: Dec 23, 2018
  42. N3uRo

    N3uRo

    Joined:
    Dec 10, 2011
    Posts:
    592
  43. Onsterion

    Onsterion

    Joined:
    Feb 21, 2014
    Posts:
    209
    I do this but in some places have missed functions and variables.
     
  44. Onsterion

    Onsterion

    Joined:
    Feb 21, 2014
    Posts:
    209
    I solved the missed DnsClient and System.Buffers but i had a connection problem:

    "{ ClusterId : \"1\", ConnectionMode : \"Automatic\", Type : \"Unknown\", State : \"Disconnected\", Servers : [{ ServerId: \"

    { ClusterId : 1, EndPoint : \"Unspecified/localhost:27017\" }
    \", EndPoint: \"Unspecified/localhost:27017\", State: \"Disconnected\", Type: \"Unknown\", HeartbeatException: \"MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. -->

    System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used.\r\n\r\n at System.Net.Sockets.SocketAsyncResult.CheckIfThrowDelayedException () [0x00014] in <ac210d81537245bc838518cc8e845861>:0 \r\n at System.Net.Sockets.Socket.EndConnect (System.IAsyncResult asyncResult) [0x0002c] in <ac210d81537245bc838518cc8e845861>:0 \r\n at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult]endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x00019] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n-- End of stack trace from previous location where exception was thrown --\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c]in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Connections.TcpStreamFactory+<ConnectAsync>d_7.MoveNext () [0x00245] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n-- End of stack trace from previous location where exception was thrown --\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Connections.TcpStreamFactory+<CreateStreamAsync>d4.MoveNext () [0x00090] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n-- End of stack trace from previous location where exception was thrown --\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Connections.BinaryConnection+<OpenHelperAsync>d48.MoveNext () [0x000a3] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n — End of inner exception stack trace --\r\n at MongoDB.Driver.Core.Connections.BinaryConnection+<OpenHelperAsync>d48.MoveNext () [0x00166] in <a619ae72525a4b10a92770b42fd370d8>:0 \r\n- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <f2e6809acb14476a81f399aeb800f8f2>:0 \r\n at MongoDB.Driver.Core.Servers.ServerMonitor+<HeartbeatAsync>d_28.MoveNext () [0x000d4] in <a619ae72525a4b10a92770b42fd370d8>:0 \" }] }"
     
  45. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,019
    I found (2019.1 alpha) that sometimes I have to drag things in the correct order.

    Google.Apis.Auth depends > Google.Apis.Core + Google.Apis
    Google.Apis depends > Google.Apis.Core + Newtonsoft.Json
    Google.Apis.Core depends > Newtonsoft.Json
    Newtonsoft.Json

    Previously I was dragging things in from top to bottom and was getting could cause crash error on both Core and Auth lib.
    I removed them all and then dragged to the project from bottom to top (let it compile completely in each step), this time the error does not occur.

    Reimporting will not work for refreshing if you have dragged them in the wrong order.