Forum Discussion
djQuecke
Jun 15, 2023Copper Contributor
.Net and Orphaned Classes
I decided to update some older code that targeted an older version of .Net. I've used vb.Net since forever so I'm used to the unwanted step-child treatment.
I copied my code out of a text file hoping to reduce the chances of conversion problems. I targeted v6 because I heard it might stick for a bit. I used the ApplicationServices class of the VB Namespace in my code. I'm writing a Class library and my code needs to write a file in the folder (or at least the folder structure) of the application calling my library. I used ApplicationServices to get the StartupPath of the user.
I decided since I'm probably the user of the library to set the path at runtime when I call the library. So, first question, anyone know how to get the user's StartPath with a .Net call?
The real problem is, VS has marked my code with "Error BC30002 Type 'Global.Microsoft.VisualBasic.ApplicationServices.User' is not defined. QLib F:\Programing\Repository\dj\Libraries\QLib\vbc 1 Active". There is no file or folder at "vbc". I can't find anywhere within the VS environment to remove it's reference. It must be within one of the project files and the last time I tried to edit one of those directly, I lost a lot of work.
I did my part and searched MS online but their suggestions didn't seem to apply when I tried them.
How do I fix the error?
Thx, dj
No RepliesBe the first to reply