Today I worked on a C#/.NET project for one of our customers. Since I was working remotely I was using my notebook instead of my usual workstation.

Out of the blue, some tests failed although I didn’t change any code, that could influence the outcome of the tests.
After some debugging I found out that one of the additional deployment items we have configured in the test setting dialog was not copied.

The reason was somehow surprising:
During startup of the test run, MSTest copies all required files into a separate directory (usually a solution sub directory named „TestResults“). But MSTest does not copy any items having a destination path that is longer than 260 characters. Unfortunately there is no warning or error, the files are just ignored.

MSTest Settings Dialog to specify Deployment Items