Topic "Property 'WinSCP.TransferOptions.ResumeSupport' lacks setter"

Author Message
dialalpha
[View user's profile]

Joined: 2014-04-25
Posts: 2
Attempting to use the C# dll to incorporate winscp into an App. According to the documentation, we can configure transfer options by creating a TransferOptions class and setting its ResumeSupport property. However, the error below is what happens when you try that -

Error: Property or indexer 'WinSCP.TransferOptions.ResumeSupport' cannot be assigned to -- it is read only


Examining the class via the object browser reveals that indeed the property doesn't have a setter. (screenshot attached)

I'm using dll version number 1.1.5.4214 and runtime version v2.0.50727

Is this a bug or is it intentional?
noset.PNG (42.96 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
TransferOptions.ResumeSupport returns TransferResumeSupport, what is an object. You need to set ITS properties.
See https://winscp.net/eng/docs/library_transferresumesupport

A have updated documentation to make this more clear:
https://winscp.net/eng/docs/library_transferoptions#properties
dialalpha
[View user's profile]

Joined: 2014-04-25
Posts: 2
AH! Thank you Martin. That does it.
fpreich
[View user's profile]

Joined: 2014-09-02
Posts: 2
Can't find this object in Powershell:

$transferOptions.ResumeSupport
Property 'ResumeSupport' cannot be found on this object. Make sure that it exists.

What's the syntax to set it to TransferResumeSupportState.On ?

Thanks in advance

FP
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
fpreich wrote:
$transferOptions.ResumeSupport
Property 'ResumeSupport' cannot be found on this object. Make sure that it exists.

You may be using an old version of WinSCP .NET assembly that lacks the TransferOptions.ResumeSupport property. Make sure you have the latest version.
_________________
Martin Prikryl
fpreich
[View user's profile]

Joined: 2014-09-02
Posts: 2
prikryl wrote:
fpreich wrote:
$transferOptions.ResumeSupport
Property 'ResumeSupport' cannot be found on this object. Make sure that it exists.

You may be using an old version of WinSCP .NET assembly that lacks the TransferOptions.ResumeSupport property. Make sure you have the latest version.

Yes, this helps !
Thanks Martin,
appreciate your great work.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License