views:

42

answers:

0

I have a unit test project which contains a few XML files for data driven tests. These files are set to Build Action Content and Copy if newer or Copy always.

For the most part, this works fine. However, when I change one of the data files without changing any code, Visual Studio will not trigger a build action at all, and no XML files will be copied. Effectively, I'm running my unit tests with the old data file.

I can trigger a manual build, but I'd like to prevent such mistakes if possible. Is there some way to make Visual Studio (2008) perform the copy operation every time someone changes the content files only?

To clarify: The XML file is inside the unit test project, not in the production code project. I do have a relevant [DeploymentItem] attribute for the file set on the test being run.