session.Open error in dotnet core 2.0

Advertisement

Alberto_Valentin
Joined:
Posts:
2
Location:
NJ

session.Open error in dotnet 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
// Password = "mypassword" // no password needed, i am using keypair file (.ppk)
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
Description: session.DebugLogPath = @"C:\Projects_c#\AWS\consoleApp\AMFConsoleApp\log.txt";

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

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.

Reply with quote

ZielinskiP
Joined:
Posts:
1
Location:
Polska

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)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

Re: .net core support

ZielinskiP wrote:

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

Reply with quote

Advertisement

You can post new topics in this forum