.NET Assembly Error After Upgrading to WinSCP 6.3

Advertisement

aksarben
Joined:
Posts:
68

.NET Assembly Error After Upgrading to WinSCP 6.3

I’m suddenly getting an error running a PowerShell script with the .NET assembly. The script has been working flawlessly for almost a year, but after upgrading to WinSCP 6.3 today, I get this error when calling $session.open().
Send-Files: Exception calling "Open" with "1" argument(s): "Method not found: 'Void System.Threading.EventWaitHandle..ctor(Boolean,
System.Threading.EventResetMode, System.String, Boolean ByRef, System.Security.AccessControl.EventWaitHandleSecurity)'."

$PSVersionTable:
Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

The script reads the .NET assembly location from an environment variable, which I haven’t changed. Does the 6.3 .NET assembly need to be copied to that location, do I need to change the environment variable, or does the install process handle all that?

I tried copying WinSCPnet.dll from the netstandard2.0 folder up one level to the folder where WinSCP.exe is located, but that causes a different error:

Send-Files: Exception calling "Open" with "1" argument(s): "The version of C:\Program Files (x86)\WinSCP\winscp.exe (6.3.0.0) does
not match version of this assembly C:\Program Files (x86)\WinSCP\WinSCPnet.dll (6.1.2.0)."

So, I then downloaded WinSCP-6.3-Automation.zip, and extracted the WinSCPnet.dll from here into the WinSCP.exe directory. That took me back the original error message:

Send-Files: Exception calling "Open" with "1" argument(s): "Method not found: 'Void System.Threading.EventWaitHandle..ctor(Boolean,
System.Threading.EventResetMode, System.String, Boolean ByRef, System.Security.AccessControl.EventWaitHandleSecurity)'."

We are currently unable to upload files to our Web site ([http://www.hymntime.com/tch/]), which gets over a million visitors a year.

Log file is attached

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum