Set-SCPItem : Could not load file or assembly 'Renci.SshNet, Version=2017.0.0.0
See original GitHub issueWe 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
`
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
VS compiled 2 binaries and I pushed the none netstandard one
Sent from my iPhone
@darkoperator what’s the catch ?