WinSCPnet.dll and .NET 8.0.1 error?

Advertisement

jeng1111
Joined:
Posts:
2

WinSCPnet.dll and .NET 8.0.1 error?

I'm using WinSCPnet.dll in Powershell Core using the latest update, which
[System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription
reveals to be .NET 8.0.1
When I call $session.Open($SessionOptions), I'm getting:
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)'."
pertinent log file section where the error occurs:
[2024-01-22 17:37:20.254] [0018]     ExeSessionProcess.CheckVersion entering
[2024-01-22 17:37:20.254] [0018]       Timestamp of <localpath>\Google Drive\vscode\Embrace\winscp.exe is 9/19/2023 9:42:52 PM
[2024-01-22 17:37:20.254] [0018]       Cached version of <localpath>\Google Drive\vscode\Embrace\winscp.exe is 6.1.2.13797, product WinSCP version is 6.1.2.0, and it was already deemed compatible
[2024-01-22 17:37:20.254] [0018]     ExeSessionProcess.CheckVersion leaving
[2024-01-22 17:37:20.254] [0018]   ExeSessionProcess..ctor leaving
[2024-01-22 17:37:20.254] [0018]   ExeSessionProcess.Start entering
[2024-01-22 17:37:20.254] [0018]     ExeSessionProcess.InitializeConsole entering
[2024-01-22 17:37:20.254] [0018]       Trying event _20360_31914913_665
[2024-01-22 17:37:20.255] [0018]     ExeSessionProcess.InitializeConsole leaving
[2024-01-22 17:37:20.255] [0018]   ExeSessionProcess.Start leaving
[2024-01-22 17:37:20.255] [0018]   Exception: System.MissingMethodException: Method not found: 'Void System.Threading.EventWaitHandle..ctor(Boolean, System.Threading.EventResetMode, System.String, Boolean ByRef, System.Security.AccessControl.EventWaitHandleSecurity)'.
   at WinSCP.ExeSessionProcess.TryCreateEvent(String name, EventWaitHandle& ev)
   at WinSCP.ExeSessionProcess.InitializeConsole()
   at WinSCP.ExeSessionProcess.Start()
   at WinSCP.Session.Open(SessionOptions sessionOptions)

Reply with quote

Advertisement

jeng1111

Use the .dll in netstandard2.0

OK. When I switched to using the WinSCPnet.dll in the netstandard2.0 folder from the automation package download, it works. Thanks.

Reply with quote

Advertisement

You can post new topics in this forum