Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Adding dll and using it in code

Posted on by 117
Hi,
 
I am trying to use Newtonsoft.Json dll in my code. i have coppied the dll file to the bin folder.
I have also added it in refrences in AOT.
 
But still if I try to use it in my class, it does not reognize th dll and throw an error that /Newtonsoft is not declared/.
Can you help me out in this situation?
 
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    Adding dll and using it in code
    .NET Framework 4.0. You can find that in AX 2012 System Requirements.
  • ShahzaibAhmed52 Profile Picture
    ShahzaibAhmed52 117 on at
    Adding dll and using it in code
    What would be the version for R2?
  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    Adding dll and using it in code
    Well, where did you get the file from? You should have selected it there or when extracting the package, if it contains binaries for several framework versions. For example, the latest package from https://github.com/JamesNK/Newtonsoft.Json/releases contain these folders:
     
     
    It's also possible to explore the content of the file, but just getting the right one is easier.
     
    Assuming you're on AX 2012 R3, use the assembly for .NET Framework 4.5.
  • ShahzaibAhmed52 Profile Picture
    ShahzaibAhmed52 117 on at
    Adding dll and using it in code
    How can I know that dll is the right version?
     
    Currently, I am using v6.0 for the Newtonsoft.

    I am working for the first time on ax 2012 so I don't have any idea about it.
  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    Adding dll and using it in code
    Is the DLL for the right version of .NET Framework?

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans