Tomas
Tomas

Reputation: 621

How to add folder relative to visual studio solution?

In my project i need to specify full path of all files I am using. Can I just add folder containing all these files inside the solution and tell visual studio where to find them ? I need to do this because because every time i want to add one file i could just specify its name and extension.`

 //Instead of 
 OpenThis("c:\bla\bla\bla\cube.obj");

 //I could do just
 OpenThis("cube.obj");
`

I know you can just add file to a solution, but is there another way ?

Upvotes: 0

Views: 120

Answers (1)

Chi Chan
Chi Chan

Reputation: 12420

You can take a look at this

Also, you might want select "Copy if newer" under the "Properties->Copy to Output Directory" for the file you want to include.

This will ensure that the file will get copied over to the output directory.

Upvotes: 1

Related Questions