1

Currently, I am having issues integrating Mikros sdk. I downloaded the Mikros 1.1.0 SDK and using Unity 2021.3.6f1. What I have done so for is register an account on Mikros, created a project and was able to get it approved.

When I try to import Mikros 1.1.0 SDK to my project on Unity, I get this error:

Assembly 'Packages/com.tatumgames.mikros/Runtime/Plugins/MikrosLibrary.dll' will not be loaded due to errors: MikrosLibrary references strong named Newtonsoft.Json Assembly references: 12.0.0.0 Found in project: 13.0.0.0. Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"

When I tried to look up how to fix this error with Newtonsoft.Json, I read these:

ref- Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0 issue using Google.Apis.*

ref-Could not load file or assembly 'NewtonSoft.Json, Version=12.0.0.0'

From what I've been researching, I am able to configure an app.config file using a bindingredirect for the Newtonsoft.json file that the package references 12.0.0.0 to 13.0.0.0, but I don't quite understand how to do that as I am still researching how that works.

I have also learned that Unity 2021.3.6f1 comes packaged out the box with Newtonsoft.Json version 13 because I have also tried downgrading my Newtonsoft.Json version to 12 to match with the package.

Here are screenshots of the specific steps I have taken on Unity.

Import Custom Package:

enter image description here

Import Mikros SDK 1.1.0 with default selection(all files to be imported):

enter image description here

Error 1:

enter image description here

Error 2:

enter image description here

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
dot_eyes
  • 51
  • 6

1 Answers1

0

I have also learned that Unity 2021.3.6f1 comes packaged out the box with Newtonsoft.Json version 13 because I have also tried downgrading my Newtonsoft.Json version to 12 to match with the package.

This seems to be the solution. But maybe you didn't do it correct. You should ensure that all projects and dependencies are using the same version. You can do this by running the following command and check the results:

update-package Newtonsoft.Json -reinstall

You may want to also look at your web.config:

  <dependentAssembly>
    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

You can also reinstall while choosing a specific version like this,

update-package Newtonsoft.Json -version 12.0.0 -reinstall

portfoliobuilder
  • 7,556
  • 14
  • 76
  • 136