views:

368

answers:

2

Can anbyody tell me how to include a certain folder when running unit tests in visual studio. In the folder are xml-files needed by the tests. I can't seem to find anymore where I need to add this folder.

Thx, Lieven Cardoen aka Johlero

A: 

I'm not sure you can add a folder to a test solution on an as-needed basis; it either has to be added to the solution and loaded every time, or you'll have to load the files individually inside your tests.

Could you clarify exactly what you're looking for, please?

Lieutenant Frost
+4  A: 

If you click on properties on the XML file, you can tell it to copy to the output folder so that it is available in the same folder as the tests. Alternately, you could select to embed it as a resource if you don't want to have to copy all the support files for your tests around.

jezell
Thx, indeed, for files this is also a way of doing it.
Lieven Cardoen