Differences
This shows you the differences between the selected revisions of the page.
2015-02-18 | 2015-02-18 | ||
5.7 Executable winscp.exe is included in .NET assembly package. (martin) | corrections (martin) | ||
Line 1: | Line 1: | ||
====== Downloading and Installing WinSCP .NET Assembly ====== | ====== Downloading and Installing WinSCP .NET Assembly ====== | ||
- | ===== Downloading and Installing ===== | + | ===== Downloading ===== |
[[library|WinSCP .NET assembly]] is available in a package named ''winscpXXXautomation.zip'' on [[&download|WinSCP download page]]. Follow the //%%.NET assembly/COM library%%// link. | [[library|WinSCP .NET assembly]] is available in a package named ''winscpXXXautomation.zip'' on [[&download|WinSCP download page]]. Follow the //%%.NET assembly/COM library%%// link. | ||
- | ===== [[executablepath]] Installed Binaries ===== | + | ===== Installing ===== |
The package includes the assembly itself (''winscpnet.dll'') and a required dependency, WinSCP [[executables|executable]] ''winscp.exe''. | The package includes the assembly itself (''winscpnet.dll'') and a required dependency, WinSCP [[executables|executable]] ''winscp.exe''. | ||
- | The binaries interactive with each other and must be kept in the same folder for the assembly to work. In rare situations this is not possible (e.g. when [[library_install#gac|installing the assembly to GAC]]), make use of ''[[library_session#properties|Session.ExecutablePath]]'' property to force the assembly to look for the ''winscp.exe'' in a different location. | + | The binaries interact with each other and must be kept in the same folder for the assembly to work. In rare situations this is not possible (e.g. when [[#gac|installing the assembly to GAC]]), make use of ''[[library_session#properties|Session.ExecutablePath]]'' property to force the assembly to look for the ''winscp.exe'' in a different location. |
==== [[vs]] Using from Visual Studio or other Development or Runtime Environment ==== | ==== [[vs]] Using from Visual Studio or other Development or Runtime Environment ==== | ||
Note that your runtime or development environment may copy the assembly into an another location. In that case you need to copy ''winscp.exe'' into that location too. | Note that your runtime or development environment may copy the assembly into an another location. In that case you need to copy ''winscp.exe'' into that location too. | ||
- | E.g. If you reference WinSCP assembly from your project in Microsoft Visual Studio, it copies the assembly during build into the project //Output path// (e.g. ''<your_project_path>/obj/Debug''). Similar case is when you install the assembly into Global Assembly Cache (GAC). | + | E.g. If you reference WinSCP assembly from your project in Microsoft Visual Studio, it copies the assembly during build into the project //Output path// (e.g. ''<your_project_path>/obj/Debug''). Similar case is when you [[#gac|install the assembly into Global Assembly Cache (GAC)]]. |
- | You may want to add ''winscp.exe'' to your Visual Studio project, to have it copied to //Output path// automatically (by setting file property //Copy to Output Directory// to //Copy if newer//). The //Build Action// should be automatically set to //Content//, what means that the file will be included when deploying your application (e.g. an [[guide_microsoft_azure_webjob_sftp#consoleapp|Azure WebJob application]]). | + | You may want to add ''winscp.exe'' to your Visual Studio project, to have it copied to the //Output path// automatically (by setting file property //Copy to Output Directory// to //Copy if newer//). The //Build Action// should be automatically set to //Content//, what means that the file will be included when deploying your application (e.g. an [[guide_microsoft_azure_webjob_sftp#consoleapp|Azure WebJob application]]). |
==== [[nuget]] NuGet Package ==== | ==== [[nuget]] NuGet Package ==== | ||
WinSCP .NET assembly in available as [[https://www.nuget.org/packages/WinSCP/|NuGet package with the same name]]. | WinSCP .NET assembly in available as [[https://www.nuget.org/packages/WinSCP/|NuGet package with the same name]]. | ||
- | The NuGet package includes the assembly itself and a required WinSCP executable. When installed, it adds the assembly as reference to your project and sets up WinSCP executable to be copied to project output directory, so that it can be found on run-time, as described [[#vs|above]]. | + | The NuGet package includes the assembly itself and the required WinSCP executable. When installed, it adds the assembly as reference to your project and sets up WinSCP executable to be copied to project output directory, so that it can be found on run-time, as described [[#vs|above]]. |
No other setup is needed, so you can start coding straight away after installation. | No other setup is needed, so you can start coding straight away after installation. | ||
Line 27: | Line 27: | ||
In special cases, you may need to install the assembly into Global Assembly Cache (%%GAC%%), particularly to use it from [[library_ssis|SSIS]]. | In special cases, you may need to install the assembly into Global Assembly Cache (%%GAC%%), particularly to use it from [[library_ssis|SSIS]]. | ||
- | When you install the assembly to %%GAC%%, you need to [[#executablepath|configure a path to WinSCP executable]]. | + | When you install the assembly to %%GAC%%, you need to [[#installing|configure a path to WinSCP executable]]. |
==== On Development Machine ==== | ==== On Development Machine ==== | ||
Line 77: | Line 77: | ||
===== Deploying ===== | ===== Deploying ===== | ||
- | When deploying the assembly, make sure that WinSCP is installed along with the assembly on the target system and that WinSCP assembly can find the ''winscp.exe''. | + | When deploying the assembly, make sure that WinSCP executable (''winscp.exe'') is installed along with the assembly on the target system and that WinSCP assembly [[#installing|can find the executable]]. |