All: I have a unit test that is testing functionality that requires an input file. This test was built using VS 2008's built-in unit testing feature.
My problem is that the file needs to be discoverable by the unit test. However, when the test runs, it runs from a temporary "output" directory under the test results folder. It can't find my input file.
I have added the file to the unit test project, with a compile action of "none", and a copy to output directory option of "copy if newer", but the copy occurs to the normal VS output directory (under bin), and not to the unit test execution directory, so the file is not found. I don't want to hardcode paths to the file, as the test should run for anyone who checks out the unit test. I could put the input file in a solution folder, and let the test code "discover" the file by hardcoding a relative path back up the tree, but I figured that this had to be a common issue, so I wanted to check whether I was missing something.