Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Caould not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies on CRM 365 server Event Viewer

(0) ShareShare
ReportReport
Posted on by 45

Hello,

After upgrade to CRM 365 version 8.2.9, I found the following error message in Event Viewer of CRM 365 server:

Monitoring runtime failed: Machine: TEST-CRM365-01: Exception: SmokeTests failed with exception : System.TypeInitializationException: The type initializer for 'Microsoft.Crm.Monitoring.MonitoringSettings' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
at Microsoft.Crm.Core.DataServices.Configuration.SqlAzure.AzureBlobBasedDatabaseLocationSwitcher.ReadLastKnownDatabaseLocation()
at Microsoft.Crm.Core.DataServices.Configuration.SqlAzure.AzureBlobBasedDatabaseLocationSwitcher..ctor()
at Microsoft.Crm.Core.DataServices.Configuration.SqlAzure.DatabaseLocationSwitcherFactory.GetInstance()
at Microsoft.Crm.CrmDBConnectionFactory.CreateCrmDBConnection(CrmDBConnectionType connectionType, String connectionString, Guid datacenterId)
at Microsoft.Crm.SharedDatabase.DatabaseMetadata.LoadMetadataXmlFromDatabase(CrmDBConnectionType connectionType, String connectionString, Int32& maxBlobSize, Guid datacenterId)
at Microsoft.Crm.ConfigurationDatabase.ConfigurationMetadata.LoadCache(String connectionString)
at Microsoft.Crm.ConfigurationDatabase.ConfigurationMetadata.get_Cache()
at Microsoft.Crm.SharedDatabase.DatabaseService.Initialize(String tableName)
at Microsoft.Crm.SharedDatabase.DatabaseService.RetrieveInternal(String tableName, String[] columns, PropertyBag[] conditions, Nullable`1 top, Nullable`1 offset, IList`1 orderBy, QueryHints hints, IDictionary collectionToFill)
at Microsoft.Crm.SharedDatabase.DatabaseService.Retrieve(String tableName, String[] columns, PropertyBag[] conditions)
at Microsoft.Crm.ServerLocatorService.Retrieve(String tableName, String[] columns, PropertyBag[] conditions)
at Microsoft.Crm.Monitoring.MonitoringSettings..cctor()
--- End of inner exception stack trace ---
at Microsoft.Crm.Monitoring.MonitoringSettings.get_StoreResultsInDatabase()
at Microsoft.Crm.SmokeTests.Execute.ExecuteMonitoringTests(ServerRoles targetRoles, TestFrequency testFrequency, Boolean inService)
at Microsoft.Crm.SmokeTests.Execute.Main(String[] args)
at Microsoft.Crm.Monitoring.Service.MonitoringService.ExecuteTestsThreadProc(Object args).

However, in our plugin solution, we're reference Newtonsoft.Json.dll version 8.0.0.19514. Why it complains about version 6.0.0.0? 

It doesn't fix my problem by trying the following:

1. add Newtonsoft.Json.dll under C:\Program Files\Microsoft Dynamics CRM\Monitoring\bin

2. add Newtonsoft.Json.dll to web.config under assemblyBinding\dependentassembly

Can anyone help this?

Thanks.

  • Luca Sgaravato Profile Picture
    50 on at
    RE: Caould not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies on CRM 365 server Event Viewer

    Thank you alioeztas,

    worked for me on 8.2.14.10.

  • alioeztas Profile Picture
    10 on at
    RE: Caould not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies on CRM 365 server Event Viewer

    Hi,

    I also encountered this issue. 

    Please apply this Workaround to solve this issue:

    1. Copy the file Newtonsoft.Json.dll  from the Directory C:\Program Files\Microsoft Dynamics CRM\Server\bin to the Directory C:\Program Files\Microsoft Dynamics CRM\Monitoring\bin

    2. Restart MSCRMMonitoring Service

    3. Perform SmokeTests.exe to verify Monitoring Report. You should this output

    pastedimage1589352507368v1.png

  • Suggested answer
    Adrian Begovich Profile Picture
    1,019 Super User 2025 Season 1 on at
    RE: Caould not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies on CRM 365 server Event Viewer

    Hi howexg9,

    You can merge Newtonsoft.Json into your Plugin assembly by using ILMerge but this is not supported.

    I recommend using the System.Runtime.Serialization Namespace for serializing and deserializing objects, the System.Xml.Serialization Namespace to serialize objects into XML format documents or streams, and the System.Text.Json Namespace to serialize objects into JSON format documents or streams.

  • Community Member Profile Picture
    on at
    RE: Caould not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies on CRM 365 server Event Viewer

    Hi,

    I think you using newtonsoft.json.dll in some plugins or custom activity, so try to add this dll to the below path:

    C:\Program Files\Microsoft Dynamics CRM\server\bin and C:\Program Files\Microsoft Dynamics CRM\crmweb\bin

    then try again and let me know what happened.

  • Allie_B Profile Picture
    72 User Group Leader on at
    RE: Caould not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies on CRM 365 server Event Viewer

    Did you find a resolution for this issue? We are having the same recurring error with Dynamics 365 8.2.7.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February 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... 293,233 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans