Microsoft Virtualization Discussions

Could not load file or assembly 'Newtonsoft.Json

dmauro
219 Views

when using the PSToolkit provided with SnapCenter, I very often get this error when importing the DataOntap.C.dll module under the PSTOOLKIT:

 

PS C:\Windows\system32> Import-Module "C:\Program Files\NetApp\SMCore\SAL\PSToolkit\DataONTAP.C.dll"
Import-Module : Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
+ Import-Module "C:\Program Files\NetApp\SMCore\SAL\PSToolkit\DataONTAP ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand

PS C:\Windows\system32> $PSVersiontable

Name Value
---- -----
PSVersion 5.1.17763.5122
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.5122
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1


PS C:\Windows\system32>

 

there is no newtonsoft in the PSTOOLKIT directory. I even tried to grab the file from the smcore directtory but that does not change anything either.

I am trying this in the LAB but customers hit same issues. in some lab it works though. I suppose different versions.

but how do I tackle this problem for good when I hit it?

without reinstalling .Net or anything disruptive like that please, as I would give same piece of advice to customers.

it would be nice to know.

 

Domenico.

0 REPLIES 0
Public