Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.Net '<name>' is not a member of '<classname>'

Status
Not open for further replies.

nidgep

Programmer
Sep 4, 2001
80
GB
hi

I have inherited several VB.Net projects which are wrapped up in a solution.
In one of the projects (DLL) i have added a new public function to an existing class.
Then within a windows form, I then create an instance of the object.class and then proceed to call the newly created function, within the class instance.
When i compile (or even before i compile) I am getting an error message which states that the new function is not a member of the class.
Using object browser I can see that the function is a member of the class and is scoped as public as expected.

Can anyone suggest why this is happening and how to resolve please?
 
could it be that your project (the one with the changed function in it) is not being rebuild but skipped. Build the project seperatly and then try again.

Christiaan Baes
Belgium

My Blog
"In a system where you can define a factor as part of a third factor, you need another layer to check the main layer in case the second layer is not the base unit." - jrbarnett
 
hi Christiaan

Had already tried that, but have rebuilt the offending project and checked that the dll in the bin\ folder has had its date modified date correctly updated. Even deleted it and built the project again.
the function can still be seen within object explorer and is still scoped as public.

there must be something silly that I either have or havent done here....
 
Is the project correctly referenced? You could check the filepath of the reference. Or just delete the reference and set it again.

Christiaan Baes
Belgium

My Blog
"In a system where you can define a factor as part of a third factor, you need another layer to check the main layer in case the second layer is not the base unit." - jrbarnett
 
hi Christiaan

Problem solved. For some reason the project reference was invalid, although the path to the reference was correct. I removed the reference entirely from the solution and then added it back and rebuilt the whole solution again, which then compiled without any problems.
Thank you for your help - much appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top