rwheeler23
asked on
How to start a new FTP File Transfer program using C#?
I was given this old VB program that I converted to C#. I see this in the Solution Explorer(see screenshot). I am now trying to create a new project starting from scratch. What must I do to see FTPClient under references? From where does the code for c# FTPClient.cs come and what is that last listing 'FTP File Transfer'. In order words what must I do to get be able to create a new FTP transfer project? Please see attached screenshot.
ASKER
I came across this article. I am just having a hard time finding all the references needed plus extensions(FTP File Transfer.vdproj). I was given an old VB project that fails to load because extensions are not loaded.
Based on the unusual letter case of FTPfileInfo and the tree classes, I'm guessing that code is probably from this GitHub project:
https://github.com/conficient/ftpclient/tree/master/FtpClient/FtpClientCS
I'm not in front of my PC so I can't tell you what references it might need (it looks like you already have the Microsoft.VisualBasic reference), but if it won't compile and doesn't know a particular type that's located somewhere in the code, just let us know what the types are. Sometimes VS can tell you what you need. Right click on the error and there may be a suggestions section in the context menu that will suggest a reference to add (and clicking on it will add the reference for you).
I also see you have the Renci SSH client. Are you transferring via FTP or SFTP? Renci does both SSH and SFTP in the same library.
https://github.com/conficient/ftpclient/tree/master/FtpClient/FtpClientCS
I also see you have the Renci SSH client. Are you transferring via FTP or SFTP? Renci does both SSH and SFTP in the same library.
Oh and References are for separate libraries and assemblies. The FTPClient here is simply a library you've added straight into your code, so it won't show up in References.
If you want it to be separate for some reason (there's probably no need to), you could create a new project that compiles the FTPClient class separately into a DLL and you could then add either that project itself as a reference or you could add the compiled DLL as a reference. But there's probably not a great reason to compile it separately.
If you want it to be separate for some reason (there's probably no need to), you could create a new project that compiles the FTPClient class separately into a DLL and you could then add either that project itself as a reference or you could add the compiled DLL as a reference. But there's probably not a great reason to compile it separately.
ASKER
From what I can tell the VB project I was sent came straight off the Code Project website. Looks like the programmer was fumbling just as I am. I am currently dissecting the code and creating a new project with only the code necessary. I am comparing this to a working SFTP project I created that uses Renci Ssh. I am still trying to learning when a new reference is needed or when only code is needed. This project got more complicated because I had to load the Microsoft Visual Studio Installer Project extension. I am slowly learning what extensions are needed for different projects.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent point. Thank you again for a thorough explanation.
https://docs.microsoft.com/en-us/dotnet/framework/network-programming/ftp