Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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

Thanks!
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.
martin

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.
solutionsville

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.
martin

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.
solutionsville

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,