Forum Discussion
Method not found: 'Void Newtonsoft.Json.JsonSerializerSettings..ctor(Newtonsoft.Json.JsonSerializer"
Can you please share the full details of the "Copy details to clipboard"?
Hello,
i am facing the same problem.
my version in C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Newtonsoft.Json is:
v4.0_13.0.0.0__30ad4fe6b2a6aeed
and the copy details: https://gist.github.com/cw-dvs/d2e607dd8d65a8a6eee545854d42e925
in the meanwhile i am reverting to the january release.
- RuiRomanoMS5 months ago
Microsoft Employee
We’ve identified an issue in the March release affecting users who have Newtonsoft.Json (version 13.0.1) installed in their Global Assembly Cache (GAC).
What is happening?
The latest update utilizes code features introduced in Newtonsoft.Json 13.0.2. Because all 13.x versions of this library share the same assembly version (13.0.0.0), Power BI Desktop prioritize the older version stored in your GAC over the version included with the app, leading to an error.Current Workarounds
Our team is actively working on a better solution to this problem. In the meantime, you can resolve this by ensuring the GAC does not override the required library using one of the following methods:- Option 1: Remove the assembly from the GAC Run the following command in your terminal: gacutil.exe /u Newtonsoft.Json
Option 2: Update the GAC to a compatible version (13.0.3 or higher) Download the newer DLL and install it using: gacutil.exe /i "<path to dll>"
- h1tman5 months agoRegular Visitor
The only thing that worked for me is this PowerShell script that I have created. Open PowerShell with admin credentials and copy and paste the below:
# -----------------------------
# Install Newtonsoft.Json 13.0.3 to GAC (keep old versions)
# -----------------------------
# Temp folder for download
$tempBase = "C:\Temp\NewtonsoftInstall"
New-Item -ItemType Directory -Force -Path $tempBase | Out-Null
# Target version
$version = "13.0.3"
$publicKeyToken = "30ad4fe6b2a6aeed"
# NuGet package URL
$nugetUrl = "https://www.nuget.org/api/v2/package/Newtonsoft.Json/$version"
# Folder for this download
$tempPath = Join-Path $tempBase "Newtonsoft_$version"
New-Item -ItemType Directory -Force -Path $tempPath | Out-Null
# Download NuGet package
$nupkgPath = Join-Path $tempPath "newtonsoft.nupkg"
Invoke-WebRequest -Uri $nugetUrl -OutFile $nupkgPath
# Rename .nupkg to .zip for extraction
$zipPath = Join-Path $tempPath "newtonsoft.zip"
Rename-Item -Path $nupkgPath -NewName "newtonsoft.zip"
# Extract ZIP
Expand-Archive -Path $zipPath -DestinationPath $tempPath -Force
# Locate net45 DLL
$dllPath = Get-ChildItem -Path $tempPath -Recurse -Filter "Newtonsoft.Json.dll" |
Where-Object { $_.FullName -match "\\net45\\" } |
Select-Object -First 1
if (-not $dllPath) { throw "ERROR: Newtonsoft.Json.dll not found!" }
# GAC path for this version
$gacRoot = "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Newtonsoft.Json"
$gacFolder = "$gacRoot\$version`__$publicKeyToken"
# Skip if this exact version is already installed
if (Test-Path $gacFolder) {
Write-Host "Newtonsoft.Json version $version already exists in GAC."
return
}
# Create GAC folder
New-Item -ItemType Directory -Path $gacFolder -Force | Out-Null
# Take ownership & set permissions
takeown /f $gacFolder /r /d y | Out-Null
icacls $gacFolder /grant administrators:F /t | Out-Null
# Copy DLL into GAC
Copy-Item $dllPath.FullName -Destination $gacFolder -Force
Write-Host "Installed Newtonsoft.Json version $version into GAC."
Write-Host "Location: $gacFolder"
- Option 1: Remove the assembly from the GAC Run the following command in your terminal: gacutil.exe /u Newtonsoft.Json