Post a reply

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: WinSCPnet.dll targeted framework is not as expected for netstandard2.0

Sorry, we do not provide builds for .NET framework 2.0 (nor 3) anymore. Note that .NET Standard is not the same as .NET Framework.

Though you can download the source code and built it yourself – It will need some modifications though.
blindpilot

WinSCPnet.dll targeted framework is not as expected for netstandard2.0

Version of WinSCP: 5.15.9

Version of Microsoft Windows: 7

Transfer protocol: SFTP, S3

Using scripting/automation.

Error message: "Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly '<project path>\WinSCPnet.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

Steps that lead to the problem: After adding the WinSCPnet reference (dll from WinSCP-5.15.9-Automation.zip\netstandard2.0 directory) into the project, I tried to build the project.

Other notes: Upgrading to newer framework is not an option in this situation, so I need to make this work with .NET 2 or 3.5.

Using reflection I can see that the library I've used from the netstandard2.0 directory appears to target .NET 4 (see attachment).

Can this be rebuilt targeting the .NET 2.0 framework please?