Unable to embed the WinSCPnet.dll into C# .exe file.

Advertisement

solutionsville
Joined:
Posts:
23
Location:
Ft Worth

Unable to embed the WinSCPnet.dll into C# .exe file.

Martin, I am not able to embed the dll into my project. I get an error concerning not the correct assembly version. Is there something in the dll that is preventing this?

The error I get when I run the program is;

The version of C:\Program Files (x86(WinSCP\WinSCP.exe(5.9.2.0) does not match version of this assembly F:\CnaFirmware.exe (1.0.0.0).
Thanks,

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: Unable to embed the WinSCPnet.dll into C# .exe file.

I've never seen this problem before.

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Please enable debug logging (Session.DebugLogPath) and send me the log.

Reply with quote

solutionsville
Joined:
Posts:
23
Location:
Ft Worth

Re: Unable to embed the WinSCPnet.dll into C# .exe file.

Hi Martin, I did not even get to the point of running the app.

As soon as I change the WinSCPnet Reference Properties Embed Interop Types = true, it gives me; Interop type 'Session', 'FileTransferProgressEventArgs', 'OutputDataReceivedEventArgs', "Session Options', 'TransferOptions', 'TransferOptionsResult' cannot be embedded. Use the applicable interface instead.

Set the field to False, and the errors clear.

Note here that the WinSCPnet.dll is not a project resource. It is a reference and is added to the project from Tortoise SVN, so it never shows as a resource. That may be part of the issue.

Let me know what else you would like me to try if anything. I am thinking that I will just have to distribute the WinSCPnet.dll with the executable. The users that will be using this app I am developing will most likely have WinSCP installed.

Reply with quote

martin
Site Admin
martin avatar

Re: Unable to embed the WinSCPnet.dll into C# .exe file.

OK, I understand now, what do you mean by "embed". I was not aware of this feature.

You have to set Session.DisableVersionCheck = true.

Reply with quote

solutionsville

Re: Unable to embed the WinSCPnet.dll into C# .exe file.

Cool. That stopped the error message. Now it is not embedding the file still. That is not a WinSCP thing, so I need to figure that one out. I will let you know if I figure out anything.

Thanks Martin.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum