question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set-SCPItem : Could not load file or assembly 'Renci.SshNet, Version=2017.0.0.0

See original GitHub issue

We are installing Posh-SSH from gallery using Install-Module Posh-SSH and hitting this error when using Set-SCPItem. This has been working fine for months until this week we started seeing this. When I check the version of the Renci.SshNet.dll in the assembly path it shows version 2020 not 2017.

`PS C:\ArcBox> Get-InstalledModule -Name Posh-SSH

Version Name Repository Description


3.0.2 Posh-SSH PSGallery Provide SSH and SCP functionality for executing commands against remote hosts.

PS C:\ArcBox> Update-Module Posh-SSH

PS C:\ArcBox> [System.AppDomain]::CurrentDomain.GetAssemblies() | ? { $_.Location -like ‘ssh’ }

GAC Version Location


False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\Assembly\Newtonsoft.Json.dll
False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\Assembly\Renci.SshNet.dll
False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\Assembly\SshNet.Security.Cryptography.dll
False v4.0.30319 C:\Program Files\WindowsPowerShell\Modules\Posh-SSH\3.0.2\PoshSSH.dll

PS C:\ArcBox> Set-SCPItem -ComputerName $CentOSVmIp -Credential $linCreds -Destination “/home/$nestedLinuxUsername” -Path “$agentScript\installArcAgentModifiedCentOS.sh” -Force

Set-SCPItem : Could not load file or assembly ‘Renci.SshNet, Version=2017.0.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106’ or one of its dependencies. The system cannot find the file specified. At line:1 char:1

  • Set-SCPItem -ComputerName $CentOSVmIp -Credential $linCreds -Destinat …
  •   + CategoryInfo          : NotSpecified: (:) [Set-SCPItem], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,SSH.SetScpItem
    
    

`

image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
darkoperatorcommented, May 20, 2022

VS compiled 2 binaries and I pushed the none netstandard one

Sent from my iPhone

On May 20, 2022, at 1:05 PM, Max Kozlov @.***> wrote:

@darkoperator what’s the catch ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

0reactions
MVKozlovcommented, May 20, 2022

@darkoperator what’s the catch ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found