I\'m trying to access a file in my solution structure during the unit test. My unit test project has the bin\\Debug\\ as the output directory. So I have written
This is an update for anybody who might be running into this problem using Visual Studio 2015. Congruent to @guysherman, I have a Solution Items folder under the Solution file in my Solution explorer, and there should be a .testrunconfig file. If you open it using Visual Studios, Enable Deployment is a checkbox at the top that you can uncheck.
I had the same problem where my tests were deploying .dll's to a TestRun folder every time I ran the unit tests, but the .config file that was included with the executable references another common.config, which did not deploy with everything else, so I never connected to my SQL server because that was specified in the common.config. Unchecking the Enable Deployment option ran my tests right from the bin folder specified in the project.