web
You’re offline. This is a read only version of the page.
close
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.

I have the same question (0)
  • Allie_B Profile Picture
    74 User Group Leader on at

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

  • Community Member Profile Picture
    on at

    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.

  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    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.

  • alioeztas Profile Picture
    10 on at

    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

  • Luca Sgaravato Profile Picture
    50 on at

    Thank you alioeztas,

    worked for me on 8.2.14.10.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans