Thursday, December 18, 2008

Visual studio test environment and provide additional files

If you want, for example, to copy additional files to test location for some unit test, for example, some XML file, do the following:
  1. Add test.xml to test project
  2. Set "Copy to output directory" property of file to "Copy always"
  3. For test method add [DeploymentItem("test.xml")] attribute.

No comments: