Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0..... #181

Closed
desireewilliams opened this issue Nov 6, 2019 · 4 comments

Comments

@desireewilliams
Copy link

With the release of version 2.0.1911.1, I updated my existing module in order to get some of the newer cmdlets that were released. Connect-PartnerCenter still works (well, sort of. The -ApplicationId option is no longer valid, but I could get it to connect so that's neither here nor there).

However, when I run any other command I get:
Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1

  • Get-PartnerCustomer
  •   + CategoryInfo          : NotSpecified: (:) [Get-PartnerCustomer], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.Store.PartnerCenter.PowerShell.Commands.GetPartnerCustomer
    
    

The two cmdlets that I tested this on are Get-PartnerCustomer and Get-PartnerCustomerUsageRecord. I have also replicated the behavior on a system that has never had the PartnerCenter module installed on it.

If I open the folder with the module files in it, there is a Newtonsoft.Json.dll available. However, it is not the version mentioned above:
image

@ghost
Copy link

ghost commented Nov 7, 2019

@desireewilliams would it be possible for you to share the output from Get-Module after you have loaded all the modules had loaded when you encountered this error?

@desireewilliams
Copy link
Author

desireewilliams commented Nov 7, 2019

@IsaiahWilliams here is both the error and the modules from a new instance of PowerShell
image

Here's a text version of the Get-Module
ModuleType Version Name ExportedCommands


Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Manifest 3.0.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-Auth...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest 3.0.0.0 Microsoft.WSMan.Management {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, Enable-WSMan...
Script 2.0.1911.1 PartnerCenter {Add-PartnerCustomerCartLineItem, Add-PartnerCustomerUserRoleMember,...
Script 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSReadLineKe...

@Sam09m
Copy link

Sam09m commented Nov 7, 2019

I'm experiencing a similar issue. I'm able to Connect to Partner Center, but not perform a Get-PartnerUser command. Screenshot attached:
image

@ghost
Copy link

ghost commented Nov 8, 2019

@desireewilliams and @Sam09m thank you for opening this issue. I just released version 2.0.1911.2 which contains a fix for this issue. After updating to the latest version please let me know if you have any other issues.

@ghost ghost closed this as completed Nov 8, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants