- ERROR:
Namespace or type specified in the Imports 'Project.nsDB2' 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.
I create a namespace in a DB.vb file, in the App_code folder
Imports SQLClient....
Namspace nsDB
Partial Public Class clsDB
... many public methods... (functions and subs)
...
I am able to Import nsDB in a FORM.vb class, no problem
I access the methods in the clsDB at will.
I create a 2nd namespace: DB2.vb, nsDB2, clsDB2, ...methods2...
This 2nd namespace does not appear in the intellisense, nor is seen by the compiler
The build fails with error stated above.
I had thought at some point that, closing down Visual Studio was effective... but it has not worked on this instance.
Can someone help me?
.
Thank you so much,
NicMartel
.
Nic MartelPosted Feb 6, 2009, 5:46 AM
I may have answered my own question.
My earlier post should have mentioned that I copied these namespace vb files into a new project... DID NOT GO THRU THE ADD-NEW ITEM-CLASS scenario...
I renamed the faulty DB2.vb to DB2(4letterword).vb
I created a blank class named DB2.vb, and saw immediately that it came up in the intellisense.
I copied all the code in the 4letterword version into the new DB2.vb and voila! all good.
I do not know how the system found the DB.vb without any problems.
Undoubtedly the compiler is drawing its input from the project list and that was not being updated by either a save of the file, or an exclude/include, or an exit of Visual Studio and reEntry???
I don't have time to figure this out now...
Perhaps one of you may tell me how I lucked up and got the DB.vb to be seen in the first place.