When runnning unit tests What directory am I in?

I have some Nunit tests that work fine, but are based on finding an XML file in the directory the application runs in.
When I try running them in VSTS I get an error - File not found.

Thanks,
Tom

[206 byte] By [tomkle] at [2007-12-21]
# 1

They are deloyeed to a deployment directory that is off the solution directory. Deployment cannot be turned off.

To add files as deployment items either edit the Run configuration, or add a [DeploymentItem] attribute to the relevant test.

dhoptonMSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 2

thanks for the post that fixed my problem. However i have a question?

In my test project i am testing a dll that has a xyz.txt file set as content and with "Copy to Output Directory" = "Always copy" This moves the file to the output directory but not to the test run directory, which I thought it should.

Why does the test output directory ignore the project settings ?

thanks

Dan

DanTanzer at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 3
We do not pick up files that are in the output directory -- you need to mark them as deployment items either in the run config, or on the unit test method. We will then deploy these items to the deployment directory so that your test can get access to those files.
dhoptonMSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified