Topic ".net bacimageformatexception was unhandled"

Author Message
xyz999
[View user's profile]

Joined: 2013-08-13
Posts: 2
Location: aloha
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!
Advertisements
JasonRkr
[View user's profile]

Joined: 2013-07-24
Posts: 13
Location: Sunny Southern California
xyz999,

Can you provide your code?

Jason
xyz999
[View user's profile]

Joined: 2013-08-13
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 ();
}
}
}
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License