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: Could not load file or assembly 'WinSCPnet in SSIS

manju wrote:

i am using SFTP in SSIS package to transfer the report from local to SFTP server.

But during transformation i am facing the below issue.
"Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'WinSCPnet, Version=1.4.0.7781, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf' or one of its dependencies. The system cannot find the file specified.
File name: 'WinSCPnet, Version=1.4.0.7781, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf'
at ST_3a41ca636c1a4c4d842cfef4217f5cbd.csproj.ScriptMain.Main()"

can you provide your suggestions to resolve this issue.

Did you follow these instructions?
https://winscp.net/eng/docs/library_ssis
manju

Could not load file or assembly 'WinSCPnet in SSIS

Hi ,

i am using SFTP in SSIS package to transfer the report from local to SFTP server.

But during transformation i am facing the below issue.
"Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'WinSCPnet, Version=1.4.0.7781, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf' or one of its dependencies. The system cannot find the file specified.
File name: 'WinSCPnet, Version=1.4.0.7781, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf'
at ST_3a41ca636c1a4c4d842cfef4217f5cbd.csproj.ScriptMain.Main()"

can you provide your suggestions to resolve this issue.
martin

Re: Could not load file or assembly 'WinSCPnet' or one of its...

The .NET assembly will have name WinSCPnet.dll officialy since the next major release.

The only workaround for you until that, is not to rename the assembly. You can rename winscp.exe instead, or avoid including it into the project (and use Session.ExecutablePath to point to the new name or different location).
peterpatter

Could not load file or assembly 'WinSCPnet' or one of its...

Hi all,

I have an existing ASP.NET project and trying to incorporate WinSCPs SFTP functionality into this project.

I have followed the instructions on the .NET assembly / COM library section and performed the following actions:
- Renamed WinSCP.dll to WinSCPnet.dll
- Added the WinSCPnet.dll as a reference
- Added WinSCP.exe and the original WinSCP.dll into my project and set them to be copied to the output folder as per instructions

When I test the project that the WinSCP stuff is in, everything works fine.
But when I build the whole ASP.NET project and try to access the website, I get this error:

Could not load file or assembly 'WinSCPnet' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

This seems to be happening because the name of the WinSCP.dll has been changed to WinSCPnet.dll to get round the namespace conflict (as described in the instructions).
When I delete the WinSCPnet.dll from the bin directory the website works fine.

Has anyone else come across this?
Any ideas who to fix it?

Thanks
Peter