.net bacimageformatexception was unhandled

Advertisement

xyz999
Joined:
Posts:
2
Location:
aloha

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

Reply with quote

Advertisement

xyz999
Joined:
Posts:
2
Location:
aloha

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 ();
}
}
}

Reply with quote

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

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.

Reply with quote

Advertisement

You can post new topics in this forum