All Scripts failing since upgrade to 5.15

Advertisement

rdavid2
Joined:
Posts:
3
Location:
WESTCHESTER, IL

All Scripts failing since upgrade to 5.15

Yesterday started getting messages about new version of WINSCP and I proceeded to upgrade WINSCP. Tested various sites with GUI with no problem. Then every automated job started failing. The first job I tested connected and got to the username and timed out. I tired a few things I found online and then discovered it was not bringing over the default directories.

I need to get the connections working in the automated scripts or do things manually until we find something that does work.

These scripts have been around for a few years now.

bob davidson

Reply with quote

Advertisement

yucikala
Joined:
Posts:
3
Location:
Čáslav

I have problem with powershell after update

I upgrade to 5.15 from version before.

Now when I run powershell script, it failed.
Code:
# Load WinSCP .NET assembly
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
Add-Type : Nelze načíst soubor nebo sestavení file:///C:\Program Files (x86)\WinSCP\WinSCPnet.dll nebo jeden z jejich závislých prvků. Toto sestavení je vytvořeno modulem runtime, který je novější než aktuálně zavedený modul runtime, a nelze je zavést.
At line:4 char:9
+ Add-Type <<<< -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand

What's wrong now? Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,505
Location:
Prague, Czechia

Re: I have problem with powershell after update

yucikala wrote:

I upgrade to 5.15 from version before.

Now when I run powershell script, it failed.
Code:
# Load WinSCP .NET assembly
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
Add-Type : Nelze načíst soubor nebo sestavení file:///C:\Program Files (x86)\WinSCP\WinSCPnet.dll nebo jeden z jejich závislých prvků. Toto sestavení je vytvořeno modulem runtime, který je novější než aktuálně zavedený modul runtime, a nelze je zavést.
At line:4 char:9
+ Add-Type <<<< -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand

What's wrong now? Thanks
Since 5.14, WinSCP .NET assembly requires .NET framework 4.
See https://winscp.net/eng/docs/incompatible_changes

Reply with quote

yucikala
Joined:
Posts:
3
Location:
Čáslav

Whatever I have .NET 4 installed

Must be version 4.0? I have minimaly installed 4.7.2, 4.5.1, 4.6 a 4.6.1 - if I look to programs and functions. As you can see at attachment, my Visual studio has 4.0 framework...

May I some other parts install?

obrázek 9.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Whatever I have .NET 4 installed

But your PowerShell loads an old version of .NET framework for some reason. What version of PowerShell do you have?

Reply with quote

Advertisement

You can post new topics in this forum