Referencing Assembly Problem

O

Oliver Drobnik

Hi,

I have a curious problem using VS.NET 2002

I create a new class library with a public function

Public Class ASN1
Public Sub New()
End Sub

Public Sub test()
MsgBox("test")
End Sub

End Class

Now I open a new Solution, Add a new Reference to the DLL (in bin
directory).

now I can use DIM and I even see the test method in the object browser
BUT ..

Dim asn1 As New components.ASN1() <- here it shows me the class
names!
asn1.... <- it does not show my any methods here


What could be the reason for this?!!

On a different PC with VS.NET 2003 this works without problems. Is
this a VS.NET 2002 bug?

kind regards
Oliver Drobnik
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi,

In addition to referencing the assembly, you should also add the "using"
statement for the assembly's namespace(s), in your example this seems to be
"components", and the statement will therefore look like:

using components;

Ensure you don't have other syntax errors in your code. If there are errors,
Intellisense works much worse or doesn't work at all.

It is also possible that Intellisense project database has been corrupted
(this happens from time to time). In this case, close the solution and
remove the .projdata file for your project. Then, re-open the solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top