darkoperator / Posh-SSH

PowerShell Module for automating tasks on remote systems using SSH
BSD 3-Clause "New" or "Revised" License
985 stars 227 forks source link

Cannot install the module in 32 bit powershell #521

Open alaahil opened 1 year ago

alaahil commented 1 year ago

I am trying to install the module (3.0.8) on 32 bit powershell and I am getting the error below:

PackageManagement\Install-Package : The member 'FileList' in the module manifest is not valid: Could not load file or assembly 'Renci.SshNet, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

The module installs normally on the 64 bit powershell. Also note that older versions (2.3.0) is working on both 64 and 32, but newer versions fail to install on the 32 bit.

I tried renaming the DLL 'Renci.SshNet' into something else and it worked, however I would like to automate the installation of the module from PS gallery, could you please help with that?

MVKozlov commented 1 year ago

Seems this is something like #330 and #519

alaahil commented 1 year ago

Thank you. Any idea when version 4 will be on psgallery?

darkoperator commented 1 year ago

When it is ready. Right bow started dev on 4.0 this last weekend

darkoperator commented 1 year ago

Able to replicate, you are running and x64 host and installing the module both under x64 and x86?

alaahil commented 1 year ago

Able to replicate, you are running and x64 host and installing the module both under x64 and x86?

Yes this is it.

alaahil commented 1 year ago

Good morning, No intention to pressure, but do you have any idea when this is expected to be fixed?

darkoperator commented 1 year ago

Not at the moment, no clue as to why it happensSent from my iPhoneOn Apr 17, 2023, at 4:52 AM, alaahil @.***> wrote: Good morning, No intention to pressure, but do you have any idea when this is expected to be fixed?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

darkoperator commented 1 year ago

you only need to install it on one of the version of the powershell and it will be available to the other. I just installed it under the 64bit and was able to load under 32 bit. the module path when installed via installed module is the same and the binaries are compiled to be able to load under either.

alaahil commented 1 year ago

Hello, Yes indeed, we are using it on both. My issue is (and this is not urgent) i am doing a script that is running in 32 bit mode on a 64 bit machine, that upgrades the existing used modules in our applications (posh ssh being one of them), we will exclude the automated upgrade for posh ssh and we will do it manually in normal 64 bit mode until we have update from you.

thanks again

darkoperator commented 1 year ago

Just to set expectations this is a low priority issue given impact. Specially since the module is provided “as is” since it is a side project I work on when I have spare time from 2 jobs and family.

mtw0808 commented 1 year ago

Hey @darkoperator , understand this is just a side project, and available as-is. but after any advice for the 32-bit operation.

when I try run import-module posh-ssh from x86 powershell, I get: _Import-Module : Could not load file or assembly 'Renci.SshNet, Version=10.0.0.0, Culture=neutral, PublicKeyToken=****' or one of its dependencies__

and when I try Install-Module Posh-SSH, I get: PackageManagement\Install-Package : The member 'FileList' in the module manifest is not valid: Could not load file or assembly 'Renci.SshNet, Version=10.0.0.0, Culture=neutral, PublicKeyToken=****' or one of its dependencies.

have confirmed my x86 powershell has the same module path as the 64 bit version any help would be much appreciated, thanks!

MVKozlov commented 1 year ago

seems the library Renci.SshNet in this project was compiled for x64 only You may try to use original library from source