Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Net 4.6 and Azure DocumentDb

Discussion in 'Experimental Scripting Previews' started by jtdev, Jul 25, 2017.

  1. jtdev

    jtdev

    Joined:
    Apr 13, 2014
    Posts:
    12
    I'm trying to get Azure DocumentDb to work with the .NET 4.6 experimental backend, and I'm getting this type load exception. Any idea what's going on or is this even possible? Thanks!

    I have my C# DLL set to .NET 4.6 and have the DocumentDb DLL references and copied over to the plugins directory. Everything seems to build fine, it's just at runtime when I make the call to Initialize the client I get this:

    TypeLoadException: Could not resolve type with token 010000f6
    Microsoft.Azure.Documents.Client.DocumentClient.Initialize (System.Uri serviceEndpoint, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, System.Nullable`1[T] desiredConsistencyLevel) (at <3034b756466e4e2db019736f9235e573>:0)
    Microsoft.Azure.Documents.Client.DocumentClient..ctor (System.Uri serviceEndpoint, System.String authKeyOrResourceToken, Microsoft.Azure.Documents.Client.ConnectionPolicy connectionPolicy, System.Nullable`1[T] desiredConsistencyLevel, Newtonsoft.Json.JsonSerializerSettings serializerSettings) (at <3034b756466e4e2db019736f9235e573>:0)
    Unity2017DLLTest.DocumentDBRepository`1[T].Initialize () (at <21c9750edaf1498992aa9a4ef9990825>:0)
    Unity2017DLLTest.MyUtilities.InitDb () (at <21c9750edaf1498992aa9a4ef9990825>:0)
    AzureDocDb.OnGUI () (at Assets/AzureDocDb.cs:27)
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I'm not sure about the cause of this issue. It looks like the metadata from the assembly is not being read correctly. Can you submit a bug report with this project? We would like to investigate it here.
     
    jtdev likes this.
  3. jtdev

    jtdev

    Joined:
    Apr 13, 2014
    Posts:
    12
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Thanks, we will investigate this.
     
    jtdev likes this.
  5. jtdev

    jtdev

    Joined:
    Apr 13, 2014
    Posts:
    12
    @JoshPeterson , this issue is a dupe from one that's been around for a while without much interest in the tracker. Our team needs to decide pretty soon on our backend connection scenario from a Unity headless server, and DocumentDb is our preferred Db.

    Do you have an idea when and if this issue can be looked at? We might have to go with a different approach altogether if we can't access DocDb from Unity any time soon.

    Thanks!
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I would recommend looking for another solution in the near team. The new scripting runtime is still experimental in 2017.1, so you'll need to wait for the Unity 2017.2 release (or later) to have a supported version. For any production use, I would not recommend taking a dependency on the new scripting runtime now.