Topic "Error with Imports WinSCP"

Author Message
jayc
[View user's profile]

Joined: 2012-03-13
Posts: 6
I have a stand alone vb code I am writing and when I compile I get this error:

c:\vbcode\nowval.vb(9) : warning BC40056: Namespace or type specified in the Imports 'WinSCP' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

Imports WinSCP
~~~~~~


Even though I have done this:

C:\WINDOWS\Microsoft.NET\Framework\v3.5>RegAsm.exe WinSCP.dll /codebase /tlb
Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.3053
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

Types registered successfully
Assembly exported to 'C:\WINDOWS\Microsoft.NET\Framework\v3.5\WinSCP.tlb', and t
he type library was registered successfully

C:\WINDOWS\Microsoft.NET\Framework\v3.5>
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Have you added a reference to WinSCP assembly to your project?

Note that tou do not need to use regasm to use WinSCP assembly from .NET project. That's necessary only when using a COM interface.
_________________
Martin Prikryl
jayc
[View user's profile]

Joined: 2012-03-13
Posts: 6
In References, I did a Browse and went to the C:\Program Files\WinSCP and added the WinSCP.dll

It no longer gives me this error, but not sure this if this is the correct way to add this as a reference.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
jayc wrote:
In References, I did a Browse and went to the C:\Program Files\WinSCP and added the WinSCP.dll

It no longer gives me this error, but not sure this if this is the correct way to add this as a reference.

That's correct way.
_________________
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