As @Jason correctly answered, FSProtocol
specifies the protocol to use. But in WinSCP .NET assembly that is already specified by SessionOptions.Protocol
property. So this does not explain, why the FSProtocol
is needed in your generated code.
The only case out of the protocol list that cannot be covered by SessionOptions.Protocol
is the 2
, what is SFTP protocol with fallback to SCP disabled. WinSCP by default falls back to SCP protocol, in case the server does not support SFTP. You must have disabled the fallback in GUI. So the GUI needed to use FSProtocol
to reflect that non-default settings.
Unless you really wanted the fallback disabled, you can safely remove your SessionOptions.AddRawSettings
call.