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: .net bacimageformatexception was unhandled

Please try again with a blank project. I suppose you've done something wrong. But it's difficult to tell what. There's too many possibilities.
xyz999

Hi,

See below. It is failing immediately when I attempt to instantiate sessionoptions.

thanks for your help!


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WinSCP;

namespace RobertUtility
{
public partial class FrmSftp : Form
{
public FrmSftp()
{
InitializeComponent();
}

private void FrmSftp_Load(object sender, EventArgs e)
{


}

private void button1_Click(object sender, EventArgs e)
{
SessionOptions sessionOptions = new SessionOptions();

//int intValue = 0;
//WinSCPCls sftp = new WinSCPCls();
//intValue = sftp.MainTest ();
}
}
}
JasonRkr

Re: .net bacimageformatexception was unhandled

xyz999,

Can you provide your code?

Jason
xyz999

.net bacimageformatexception was unhandled

Hi,

Am getting the below error, can anyone assist on how to correct?

BadImageFormatException was unhandled

Could not load file or assembly 'WinSCP, Version=1.0.7.3394, Culture=neutral, PublicKeyToken=b5f19f5762436b89' or one of its dependencies. The module was expected to contain an assembly manifest


-Installed winscp 5.1.7
-.Net assembly/com library
-added reference in .net solution to winscpnet.dll (renamed)
-included winscp.exe in \bin\debug folder

Thanks in advance for your help!