How does one control what's included and not included in a project?
I am forced by the environment to work in the same directory as other projects. I have written a Class and also a Module with a subroutine that does not show up in my project, yet I see other Modules that are not mine.

When I click on "Show all Files", I see my Class and my Module are in the list but have only a 'white page' icon, not a 'VB' icon even though they were added to my project via Project/Add New Item and they have a .VB extension. So when I call the subroutine, I get an error stating that subroutine name has not been declared.

a) How do I tell Solution Explorer to include them, and
b) how do I tell Solution Explorer not include the other modules that below to other Projects?

Thanks.

Welcome SteveInAlabama.

>I am forced by the environment to work in the same directory as other projects.

Create New Project and save the project in new folder.

> How do I tell Solution Explorer to include them, and how do I tell Solution Explorer not include the other modules that below to other Projects?

1. Click on "Show All Files"
2. Right click (shortcut menu) on file you want to include/exclude
3. Click on Include in Project/Exclude from project.

hmmm... Perhaps my problem is that I'm using the Express versions? In both VB2005 Express and VB2008 Express, a right click on either .vb files I want or don't want yields a menu list of only:
Open/Cut/Copy/Delete/Rename/Properties, and in VB2008 also ViewCode.

The .vb's I don't want have two additional properities: Copy to Output and Build Action (which are currently Compile but could be changed to None, Content, or Embedded Resource). My poor grayed-out orphan .vb's that I want to include don't have these two properties.

OK, sorry for being a dunce. I renamed my orphaned .vb files, then made CERTAIN I had my project open. I added to my project a new Module and new class, copied in my code, and there they are, nice and happy. Still can't figure out why I can't 'add' the old ones, but at least I'm off and running with this workaround.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.