Topic "WinSCP .Net Deployment"

Author Message
[View user's profile]

Joined: 2015-03-24
Posts: 1
From what I have used so far this is a great tool.

Added WinSCP to my C# project using nugget (which is marked as version 5.7).

Examples given are concise and had all the options working in no time at all.

I have finished my app and created a deployment package.

Anyway down to my problem.

When I try and deploy the package onto a Windows 2012 Server I get the following error:

"Unable to install or run the application. The application requires that assembly WinSCP Version be installed in the Global Assembly Cache (GAC) first."

On checking the version of WinSCPnet.dll that came as part of the deployment is

Anyway, I have added this version to my GAC using gacutil.exe, but the above error is shown again

I have manually added into the GAC the version of the WinSCPnet.dll that came with the nugget package which is version

On re-running the deployment, the same message is still displayed.

What have I done wrong?

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
Your duplicate question on StackOverflow:

My answer was:

It looks like you are publishing your application with a different version of the assembly, than you have built the application against.

The WinSCP .NET assembly version comes with WinSCP 5.1.5.

I suggest you remove all references to WinSCP from your project, delete all copies of the assembly, and reinstall the assembly from NuGet.

Then make sure that:

- In Solution Explorer, the Copy Local property is set to True for WinSCPnet.dll
- In Project properties, go to Publish page, click Application Files and make sure that Publish Status is set to Include for WinSCPnet.dll

(though these should be defaults, when installing the assembly from NuGet)

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License