Error with Imports WinSCP

Advertisement

jayc
Joined:
Posts:
6

Error with Imports WinSCP

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>

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Error with Imports WinSCP

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

Reply with quote

jayc
Joined:
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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
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

Reply with quote

Advertisement

You can post new topics in this forum