Differences
This shows you the differences between the selected revisions of the page.
2012-05-31 | 2012-06-04 | ||
installing to gac (martin) | no summary (209.59.13.62) (hidden) | ||
Line 10: | Line 10: | ||
==== [[executablepath]] Installing to Alternative Location ==== | ==== [[executablepath]] Installing to Alternative Location ==== | ||
- | If you cannot store the assembly into the same folder, you can alternatively make use of ''[[library_session#properties|Session.ExecutablePath]]'' property to force the assembly to look for the ''winscp.exe'' in a different location. | + | If you cannot store the assembly into the same folder, you can |
- | + | ||
- | 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). | + | |
- | + | ||
- | ==== [[gac]] Installing to GAC ==== | + | |
- | If you want to install the assembly into Global Assembly Cache (GAC), particularly to use in from SSIS, use following command: | + | |
- | <code> | + | |
- | %WINDIR%\Microsoft.NET\Framework\v1.1.4322\gacutil.exe /i WinSCP.dll | + | |
- | </code> | + | |
- | + | ||
- | When you install the assembly to GAC, you need to use it, as if it is [[library_install#executablepath|installed to alternative location]]. | + | |
- | + | ||
- | ===== [[registering]] Registering for COM ===== | + | |
- | WinSCP .NET assembly exposes its full interface to COM. As a COM library, it needs to be registered before use. If you are going to use the COM interface, register the assembly using((You do not need to register the assembly, if you are going to use it directly as a .NET assembly)): | + | |
- | <code> | + | |
- | %WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCP.dll /codebase /tlb | + | |
- | </code> | + | |
- | Where the ''%WINDIR%'' is path to your Windows installation, what is typically ''C:\Windows'' or ''C:\WINNT''. Note that you can keep ''%WINDIR%'' as this environment variable should be set on your system to point to the Windows folder. The ''<version>'' is version of .NET framework to register the assembly with. It is recommended to use the latest available, what currenly is ''v4.0.30319''. You may however use any framework version from 2.0 (''v2.0.50727'') up. Note that framework 3.0 and 3.5 do not ship with ''RegAsm.exe''. For these versions use ''RegAsm.exe'' from 2.0. | + | |
- | + | ||
- | Typical registration command for .NET 4.0 would be: | + | |
- | <code> | + | |
- | %WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCP.dll /codebase /tlb | + | |
- | </code> | + | |
- | + | ||
- | ===== 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''. | + |