The next version of WinSCP will include .NET Standard build of the WinSCP .NET assembly.
https://winscp.net/tracker/1640
https://winscp.net/tracker/1640
IReflect
may not be enabled in the UWP.
IReflect
was removed from .NET framework entirely, nor that it is supports on Windows Phone only.
IReflect
is still a part of the full .NET framework even on the latest versions and even on the PCs. And I doubt it will ever be removed.
IReflect
is not really needed to run WinSCP .NET assembly, I'm not sure if you would be able to use the assembly in UWP project anyway. I'll test this.
and that the most recent docs refer to a version limitation, suggests that IReflect has been removed from the most recent versions of the .NET namespace.
I do not see any support for your claim thatIReflect
is for Windows Phone only. Of course it's not.
But on the contrary, it's probably not supported on UWP.
IReflect
is for Windows Phone only. Of course it's not.
using System;
using WinSCP;
namespace WinSCPComponent
{
sealed public class Example
{
public static int Main()
{
try
{
// Setup session options
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "example.com",
UserName = "user",
Password = "mypassword",
SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
};
using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);
// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
TransferOperationResult transferResult;
transferResult = session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions);
// Throw on any error
transferResult.Check();
// Print results
foreach (TransferEventArgs transfer in transferResult.Transfers)
{
//Console.WriteLine("Upload of {0} succeeded", transfer.FileName);
}
}
return 0;
}
catch (Exception e)
{
//Console.WriteLine("Error: {0}", e);
return 1;
}
}
}
}