Differences
This shows you the differences between the selected revisions of the page.
2013-11-26 | 2013-12-20 | ||
Restored revision 1368618341. Undoing revision 1385490500. (martin) (hidden) | 5.5 removing beta tags (martin) | ||
Line 7: | Line 7: | ||
===== Installing ===== | ===== Installing ===== | ||
- | WinSCP .NET assembly interacts with WinSCP ''[[executables|winscp.exe]]''. By default it looks for the ''winscp.exe'' in the same folder, where the assembly is stored. For that reason, you should extract the package into the same folder, where you have WinSCP installed/extracted. You can also copy all binaries, ''winscp.exe'' and ''winscpnet.dll'' (''winscp.dll'' in the releases before the latest beta version), &beta into separate folder. | + | WinSCP .NET assembly interacts with WinSCP ''[[executables|winscp.exe]]''. By default it looks for the ''winscp.exe'' in the same folder, where the assembly is stored. For that reason, you should extract the package into the same folder, where you have WinSCP installed/extracted. You can also copy all binaries, ''winscp.exe'' and ''winscpnet.dll'', into separate folder. |
==== [[executablepath]] Installing to Alternative Location ==== | ==== [[executablepath]] Installing to Alternative Location ==== | ||
Line 17: | Line 17: | ||
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 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 properties //Builder action// to //None// and //Copy to Output Directory// to //Copy if newer//). //Note that, in releases before the latest beta version, it makes ''winscp.dll'' and ''winscp.exe'' to conflict. You need to rename the ''winscp.dll'' to give it a different base name, e.g. ''winscpnet.dll''. In the latest beta version, the assembly has already name ''winscpnet.dll''.// &beta | + | You may want to add ''winscp.exe'' to your Visual Studio project, to have it copied to //Output path// automatically (by setting file properties //Builder action// to //None// and //Copy to Output Directory// to //Copy if newer//). |
===== [[gac]] Installing to GAC ===== | ===== [[gac]] Installing to GAC ===== | ||
Line 25: | Line 25: | ||
==== On Development Machine ==== | ==== On Development Machine ==== | ||
- | To install the assembly into GAC on development machine, i.e. the one that has [[http://msdn.microsoft.com/en-us/library/ms717422.aspx|Windows SDK]] installed, use following command (use ''WinSCP.dll'' in the releases before the latest beta version): &beta | + | To install the assembly into GAC on development machine, i.e. the one that has [[http://msdn.microsoft.com/en-us/library/ms717422.aspx|Windows SDK]] installed, use following command: |
<code> | <code> | ||
gacutil.exe /i WinSCPnet.dll | gacutil.exe /i WinSCPnet.dll | ||
Line 43: | Line 44: | ||
===== [[registering]] Registering for COM ===== | ===== [[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)) (use ''WinSCP.dll'' in the releases before the latest beta version): &beta | + | 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> | <code> | ||
%WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCPnet.dll /codebase /tlb | %WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCPnet.dll /codebase /tlb | ||
Line 49: | Line 50: | ||
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 ''Framework'' needs to be replaced by ''Framework64'' to register the assembly for use from 64-bit applications((What is obviously available on 64-bit systems only)). The ''<version>'' is version of .NET framework to register the assembly with. It is recommended to use the latest available, what currently 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. | 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 ''Framework'' needs to be replaced by ''Framework64'' to register the assembly for use from 64-bit applications((What is obviously available on 64-bit systems only)). The ''<version>'' is version of .NET framework to register the assembly with. It is recommended to use the latest available, what currently 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 (use ''WinSCP.dll'' in the releases before the latest beta version): &beta | + | Typical registration command for .NET 4.0 would be: |
<code> | <code> | ||
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb | %WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb |