Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: What is the solution ?

Pathrudu Majji wrote:

I had an Azure function which i am hosting in Azure. I installed WinSCP 5.13.8 from NuGet package manager. When I run this code in local, it is working fine. But this throwing above method not found error once I hosted the function and ran it from AZURE.

You have to download WinSCP 5.14 RC for .NET Core support.

For information about using the assembly in Azure Function, see also: https://winscp.net/eng/docs/guide_microsoft_azure_function_sftp
Pathrudu Majji

Re: What is the solution ?

sorry for the confusion. It is not working in my local too. Do i need to add any packages? Please help me out
Pathrudu Majji

What is the solution ?

Hi Guys,

Finally what is the solution for this issue. I did not find anything from above discussion.

I had an Azure function which i am hosting in Azure. I installed WinSCP 5.13.8 from NuGet package manager. When I run this code in local, it is working fine. But this throwing above method not found error once I hosted the function and ran it from AZURE.

ERROR: System.MissingMethodException: Method not found: 'Void System.Threading.EventWaitHandle..ctor(Boolean, System.Threading.EventResetMode, System.String, Boolean ByRef, System.Security.AccessControl.EventWaitHandleSecurity)'.
martin

Re: Downloaded 5.14.1 Beta still getting error

croffers wrote:

I Downloaded the 5.14.1 Beta and I'm still receiving this error:
Method not found: 'Void System.Threading.EventWaitHandle..ctor(Boolean, System.Threading.EventResetMode, System.String, Boolean ByRef, System.Security.AccessControl.EventWaitHandleSecurity)'.

Was the right version of the dll included in the Beta download?

I'm using .net core 2.1

Thanks,
Craig

Download ".NET assembly" package:
https://winscp.net/eng/downloads.php

(Not the installer - which does not include .NET Standard build of the assembly)
croffers

Downloaded 5.14.1 Beta still getting error

I Downloaded the 5.14.1 Beta and I'm still receiving this error:
Method not found: 'Void System.Threading.EventWaitHandle..ctor(Boolean, System.Threading.EventResetMode, System.String, Boolean ByRef, System.Security.AccessControl.EventWaitHandleSecurity)'.

Was the right version of the dll included in the Beta download?

I'm using .net core 2.1

Thanks,
Craig
martin

Re: .net core support

ZielinskiP wrote:

Could you please add me to acess of the developer version of WinSCP ?

Sent.
ZielinskiP

Re: .net core support

Could you please add me to acess of the developer version of WinSCP ?

I have the same problems with .Net Core 2

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)
martin

Re: .net core support

This issue has been added to the tracker:
https://winscp.net/tracker/1640

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
martin

Re: .net core support

I'll look into it in few days. Once I have anything to test, I'll contact you.

Though note that there's no way to make the assembly working on other system than Windows.
Alberto_Valentin

.net core support

do you know when they plan on adding support?
Alberto_Valentin

MissingMethodException in Session.Open error in .NET Core 2.0

While running this C# code (dotnet 2.0.3), the app throws System.MissingMethodException when I get to this line: session.Open(sessionOptions)
Using WinSCP 5.13.1.0
my code:
SessionOptions sessionOptions = new SessionOptions
{
  Protocol = WinSCP.Protocol.Sftp,
  HostName = "10.22.111.12",
  PortNumber = 22,
  UserName = "ec2-user", // this is on AWS.  linux EC2 instance
  SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:..."
};
using (Session session = new Session())
{
  session.DebugLogPath = @"C:\Projects_c#\AWS\consoleApp\AMFConsoleApp\log.txt";
  session.Open(sessionOptions); // I get the error right here
  session.MoveFile(filePath, "10.22.111.12/appdata/content");
  session.Close();                     
}


See the log.txt attached