Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

(0) ShareShare
ReportReport
Posted on by 90

Hi all,

I have follow the below steps to add the "Newtonsoft.Json.dll" file in AX 2012 R3. Operating system is Windows Server 2012 R2.

1. Add the DLL file to Server\bin and Client\bin
2. Add reference from Server\bin folder, also try from client\bin

3. General Incremental CIL

4. Reboot server

But system still not able to recognize this object.  Any suggestion? Thanks.

1016.pastedimage1627288862175v1.png

  • LiuJie Xu Profile Picture
    90 on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    The C# project target framework is .Net Framework 4.5. And the Testing environment has installed the .Net Framework 4.5 feature from the Control panel.

    I have copied the file from the zip file, \net45\ and copy it to the server\bin and client\bin, and add it to the AOT. It works now, do not understand why.

    Thank you very much.

  • Martin Dráb Profile Picture
    233,019 Most Valuable Professional on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    Then it depends on the target framework of your C# project.

    It may be worth ignoring your C# project for now, because it's not directly related to your question. Let's focus on the DLL reference in AX. Rename the NuGet package to .zip, unzip it and then choose the DLL file you want. For example, use the one from \lib\net40\.

    Then add this particular file as a reference in AOT (make sure you don't keep the previous one) and copy this file to bin folders.

  • LiuJie Xu Profile Picture
    90 on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    I download the the file from NuGet package, the version show it v12.03.  After that, I use it in my C# project, salesforce connector. When I build this project, it was create 2 dll file under the project foleder\Debug, I copied this DLL file from this file folder.

    Then I copied to AX server\bin and Client bin folder

  • LiuJie Xu Profile Picture
    90 on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    pastedimage1627293285597v1.png

  • Martin Dráb Profile Picture
    233,019 Most Valuable Professional on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    Just saying that you've downloaded the NuGet package doesn't tell us what DLL you're using, because the package contains multiple versions of the DLL. Could you please answer once more where you got the DLL file?

  • ergun sahin Profile Picture
    8,816 Moderator on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    pastedimage1627292737352v1.png

    www.microsoft.com/.../confirmation.aspx

  • ergun sahin Profile Picture
    8,816 Moderator on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    was the dll pre-added (I'm talking about the first adding moment)

    It may be looking in the global assembly cache (GAC) or there may be a version difference between the dll you added to the bin and the dll in ax

  • LiuJie Xu Profile Picture
    90 on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    Thanks for reply.

    I download it from NuGet, version 12. From the C# project, I can see this file's runtime version is v4.0.30319

    From my Dev server, I can see there has a folder named .NetFramwork, but the Testing Environment does not have. Is that the reason? If yes, how to install/create this folder in production server. Looks like install the feature through the control panel, does not work.

    I do not have the knowledge about the .net development. I have not idea what I missed. What should I check.



    pastedimage1627291670045v5.png


    pastedimage1627291542262v3.png

  • Martin Dráb Profile Picture
    233,019 Most Valuable Professional on at
    RE: Add Newtonsoft.Json.dll (Microsoft Dynamics AX 2012) Error

    Where did you get the DLL file? Does it contain an assembly 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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,277 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,019 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans