Well, it's all moot now since I replaced WinSCP with SSH.NET, which is a much better SSH solution. I wasn't the one picked WinSCP for SFTP upload/download in ASP.NET anyway; that was my predecessor.
- cbsewell
WinSCP.EXE
so it doesn't end up in the web site root folder. The one in ~/bin
is all I need.
Program.cs
that uses WinSCP.Session
to make sure the WinSCP .NET assembly is linked in (probably not needed)
WinSCP.exe
file in: Content\C_C\Users\martin\source\repos\WebApplication1\WebApplication1\obj\Release\net6.0\PubTmp\Out\
Content/C_C/Users/<username>/Source/Repos/<git repository name>/<project name>/obj/Release - Production/Package/PackageTmp/WinSCP.EXE
Content/C_C/Users/<username>/Source/Repos/<git repository name>/<project name>/obj/Release - Production/Package/PackageTmp/bin/WinSCP.EXE
web.config
, etc. The second path contains the compiled DLLs.
WinSCP.targets
file looks OK:
<Content Include="$(MSBuildThisFileDirectory)..\tools\WinSCP.exe">
<Link>WinSCP.exe</Link>
<Visible>false</Visible>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
WinSCP.exe
in the zip file. In:
Content\B_C\<project>\<project>\obj\Release\net5.0\PubTmp\Out\WinSCP.exe
winscp.exe
– in the root. And there's no bin
folder. Though I have VS 2019. Did something change?
/bin
directory in the publish zip file. How do I keep it out of the root folder and just leave it in /bin
?