Subfolder to compile in /Release

Fork501

Freshman
Joined
Jan 27, 2007
Messages
41
Location
Weston, Florida
Hey all! I have a very (hopefully) easy question for ya:

I am doing some Access Database-integration programming and put my database in the bin/debug folder under a subfolder called dataAccess. Putting it in the debug folder allows my program to find it when I tell it that the location is "dataAccess/database.mdb". When I tell Visual Studio to build my project, it doesn't include this subfolder. When I go in the solution explorer and select the subfolder and select "Include in Project", it includes it in the compile, but puts the folder as bin/debug/dataAccess.

How do I get Visual Studio to compile my project with a subfolder called dataAccess, but still be able to point to it in my project the way I already am? (My.Application.Info.DirectoryPath & "\dataAccess\database.mdb").

I've searched, but can't even figure out how I should word this correctly in a search engine.

Thanks in advance for any and all help =)

~Derek
 
Include the dataAccess folder in your project (did that already, I think).
Go to the properties (in Visual Studio) for the file database.mdb and change the Copy to Output Directory from Do not copy to Copy if newer (or Copy always). Now when you build, the folder structure and file are copied to the output folder (bin\Debug or bin\Release).

-ner
 
Back
Top