Access my config files during debug

Mike19

New member
Joined
Dec 2, 2011
Messages
2
Programming Experience
1-3
I have organized some configuration in folders within Visual studio project explorer. When I release the application those files are copied into the same directory (including sub folders) as the exe.

Consequently I can access those files with My.Application.Info.DirectoryPath

During debug VS does not copy the files into the Debug-folder, consequently my files cannot be accessed with DirectoryPath

I wanted to do something like this
[XCODE]
#If(Debug) Then
vDirPath = My.Application.Info.DirectoryPath
#Else
vDirPath = My.Application.Info.DirectoryPath + "\myConfig\"
#End If
[/XCODE]

How do I get the right folder path?

KR
Mike
 
If you have the Copy To Output Directory property of those files set to Copy Always or Copy If Newer then they should be copied to the output folder for both Debug and Release builds.
 
Back
Top