Options

could not load an dependency assembly after Obfuscation

PetchiPetchi Posts: 6 New member
edited February 24, 2017 7:52PM in SmartAssembly
Hi,

In my Application i have used the Newtonsoft.Json.dll of version 9.0.1. Before obfuscation everything works fine. But after obfuscating my application, it throws the below error when any function which uses the Newtonsoft.Json.dll is invoked.

"Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"


I am in need to solve this immediately. Can you please help me to solve this?

Thanks.

Comments

  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Thanks for your post!

    It sounds like your application is loading the wrong version of the assembly.

    Just to confirm--are you embedding Newtonsoft.Json.dll? If it's not embedded, can you kindly make sure that the correct version of the dll is located alongside the exe?

    Should that not apply though, can you check the Newtonsoft.Json reference in your Visual Studio project to see if it's referencing version 4.5.0.0 or a different version? If your Visual Studio project is referencing a different version of the dll, you can make sure SmartAssembly uses the same one by adding a MandatoryPath attribute to your saproj file as described here: https://documentation.red-gate.com/disp ... pendencies

    Please let us know if that helps or not!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.