Differences
This shows you the differences between the selected revisions of the page.
2013-02-26 | 2013-05-09 | ||
side-by-side registration (martin) | 5.2.1 Renamed WinSCP .NET assembly to winscpnet.dll to avoid conflicts with winscp.exe (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 ''winscp.dll'') 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'' (''winscp.dll'' in the releases before the latest beta version), &beta 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 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''. | + | 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, in releases before the latest beta version, that 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 |
===== [[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: | + | 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 |
<code> | <code> | ||
- | gacutil.exe /i WinSCP.dll | + | gacutil.exe /i WinSCPnet.dll |
</code> | </code> | ||
Line 43: | Line 43: | ||
===== [[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)): | + | 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 |
<code> | <code> | ||
- | %WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCP.dll /codebase /tlb | + | %WINDIR%\Microsoft.NET\Framework\<version>\RegAsm.exe WinSCPnet.dll /codebase /tlb |
</code> | </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 ''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: | + | Typical registration command for .NET 4.0 would be (use ''WinSCP.dll'' in the releases before the latest beta version): &beta |
<code> | <code> | ||
- | %WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCP.dll /codebase /tlb | + | %WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb |
</code> | </code> | ||