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

gsclarke wrote:

I successfully ran through my program to upload a file to SFTP sever. So, it appears the DLL name should be "winscp.dll" in the project/bin/debug|release/ folder.

Ok, thanks for your investigation. Alternatively, you can use WinSCP 5.2.x assembly that is built as winscpnet.dll.
gsclarke

All is good in the WinSCP world!

8)

I successfully ran through my program to upload a file to SFTP sever. So, it appears the DLL name should be "winscp.dll" in the project/bin/debug|release/ folder.

PS: Running VS2012 Pro on Win7.
gsclarke

martin wrote:

Have you tried to debug this using fuslogvw?


Many thanks - that tool did the trick. The problem was that the Winscp.* files were not in the project's bin/debug directory where I was running the application from. I then stumbled onto the next problem with the invalid manifest error. There seems to be a bit of confusion with the install instructions...

According to the instructions, the DLL must be renamed to winscpnet.dll (anything other than winscp.dll to avoid confusion with winscp.exe) and then added to the project as a reference. However, the invalid manifest problem was solved if I renamed the file back to winscp.dll.

I just need to sort out my sshhostkey value and then I can confirm if everything is working properly.
martin

gsclarke wrote:

I have just gone through the installation and am experiencing the same problem. The DLL is renamed and registered in V4.0.xxxx .NET framework (as per the install page), but when the app is run, get the same error message:

"Could not load file ... blah blah ... system could not find the file specified." I did pick up a version discrepancy between the DLL and EXE files, and I have fixed that and also copied the EXE file to the project "obj" folder, but still getting the same problem.

Have you tried to debug this using fuslogvw?
gsclarke

Hello All,

I have just gone through the installation and am experiencing the same problem. The DLL is renamed and registered in V4.0.xxxx .NET framework (as per the install page), but when the app is run, get the same error message:

"Could not load file ... blah blah ... system could not find the file specified." I did pick up a version discrepancy between the DLL and EXE files, and I have fixed that and also copied the EXE file to the project "obj" folder, but still getting the same problem.

Any further thoughts on the problem.
ninem

Same problem with me and i waiting for new solution.
martin

Do you have .NET framework 2.0 available on your machine?
kitsune

Thanks all.

However, I have read the page https://winscp.net/eng/docs/library_install#vs before and have renamed the dll file as suggested before including in the reference.
Also, I have copied the exe file to the debug folder but the problem is not yet solved.
Thus, I made this post and would like to have advice from you all experts.

Please also find the attached screen capture of my vs debug environment for reference.
Would someone advise on this?
Thanks so much!
martin

gjs wrote:

It's a naming conflict between winscp.dll and winscp.exe. VS tries to load the exe thinking it is the referenced dll. I found that I must just reference the dll in my project and so it is copied to the output directory but do not include winscp.exe in the project just copy it to the output directory, so the dll knows where to find it.

Thanks, that's correct.
See https://winscp.net/eng/docs/library_install#vs
gjs

It's a naming conflict between winscp.dll and winscp.exe. VS tries to load the exe thinking it is the referenced dll. I found that I must just reference the dll in my project and so it is copied to the output directory but do not include winscp.exe in the project just copy it to the output directory, so the dll knows where to find it.
kitsune

Failure on using .NET assembly in VB2010

I have referenced the WinSCP.dll in my project.
With the import command (Imports WinSCP), the session object and the events called in the VB.net syntax are fine.

However, once I deploy by running in debug mode. VB prompts the error message as below:
"Could not load file or assembly 'WinSCP, Version=1.0.5.2937, Culture=neutral, PublicKeyToken=b5f19f5762436b89' or one of its dependencies. The module was expected to contain an assembly manifest."

Would someone advise on this?
Thanks so much!