Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Could not load file or assembly 'Newtonsoft.Json

Posted on by 80

HI

I have created plugin for Web API . I am keep getting bellow error. I did try to upload .dll file by reference also but still getting error.

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

Anyone have any solution for it ? 

Thanks

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Could not load file or assembly 'Newtonsoft.Json

    Hi,

    Instead of using external DLL, you can use .Net DataContractSerializer to perform serialization and deserialization.

    Please see below blog

    www.inogic.com/.../

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Could not load file or assembly 'Newtonsoft.Json

    "I have created plugin for Web API"

    this phrase doesn't make sense. If you are creating a plugin you can't load external assemblies, or you merge them (and not everything works) or in this specific case you can use another json parser, this is a post I wrote some years ago about this https://www.crmanswers.net/2015/02/json-and-crm-sandbox-plugins.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans