Differences

This shows you the differences between the selected revisions of the page.

2018-02-19 2018-04-12
5.13 was released (martin) nuget cannot be used to embed executable (martin)
Line 95: Line 95:
If you want to avoid having the ''winscp.exe'' as a separate file (e.g. when whole your project is a single ''.exe'' file and you do not want to have any dependency), you can embed the ''winscp.exe'' as a resource to your own executable. If you want to avoid having the ''winscp.exe'' as a separate file (e.g. when whole your project is a single ''.exe'' file and you do not want to have any dependency), you can embed the ''winscp.exe'' as a resource to your own executable.
-Add the ''winscp.exe'' to your Visual Studio project, if not added already (e.g. by the [[#nuget|WinSCP NuGet package]]). Change file property //Build Action// to the //Embedded Resource//. If the ''winscp.exe'' was added by the NuGet package, reset the property //Copy to Output Directory// back to the //Do not copy//.+Add the ''winscp.exe'' to your Visual Studio project. Change file property //Build Action// to the //Embedded Resource//.((You cannot use [[#nuget|NuGet package]] in this case, as it does not add ''winscp.exe'' visibly to the project, so you cannot change its properties.))
Now, before you open a session, extract the ''winscp.exe'' from resources to a temporary file using a code like: Now, before you open a session, extract the ''winscp.exe'' from resources to a temporary file using a code like:

Last modified: by martin