Topic "RestorePackages and WinSCP"

Author Message
Guest




Hi!

I have set up this parameter in project file:
<RestorePackages>true</RestorePackages>

WinSCP is referenced in that project as nuget.

My goal is to have in source control as less info as possible.
But nuget installation of WinSCP copies file (WinSCP.exe) to project folder a add's it to project.

Nuget installation should not copy file (WinSCP.exe) to project, just add a reference to packages folder like e.g. Entity folder do:

<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net40\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>

Consider change of nuget installation package.

Thanx.

Marian
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26331
Location: Prague, Czechia
The WinSCP.exe is added to the project, so that Copy to Output Directory property can be set on it.
Guest




Copy to output directory can be done also on link.
My project file looks this way:

<Content Include="..\packages\WinSCP.5.7.6\content\WinSCP.exe">
<Link>WinSCP.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

I can't see the reason to copy WinSCP.exe to project file.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26331
Location: Prague, Czechia
Do you know how to do that in NuGet package? Or do you have an example of other package that does that?

I see that there's a new concept of "contentFiles" in NuGet 3.3 that will allow this:
http://blog.nuget.org/20160126/nuget-contentFiles-demystified.html

But that's not mature yet.
jfwrightuk

Guest


I agree with the previous request. Why can't winscp.exe be added to the lib folder rather than the content folder of the nuget package? As it stands, we either have to add winscp.exe to source control to get this to build under continuous integration, or manually modify the .csproj file as suggested above, and that will break every time the package version is updated.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License