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

Advertisement

blindpilot
Joined:
Posts:
1

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?

2020-01-24_00h05_44.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,846
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum