How to get Visual Studio Unit Test to copy a file to the testing area? (which works on startup / debugging)

BACKGROUND: I have a sqlite file that is marked as COPY in its properties. When I debug a WinForms application in VS2008 (or run it), it does the right thing and copies it to the debug / launch area.

QUESTION: When I run unit tests (using unit tests VS2008), it does not execute this copy. Does anyone know how to make this work? So the sqlite database file will be copied before VS2008 tries to execute unit tests

+6
unit-testing visual-studio-2008 visual-studio
source share
1 answer

You must either docorate your test using DeploymentItemAttribute, or configure deployment using the .testrunconfig file.

See this answer for more details.

+8
source share

All Articles