I have a Unit-TestClass. To test some functions for who i need database-access, i define the DeploymentItemAttribute at the head of the class directly after the TestClassAttribute.
For some reasons, running the Testclass shows very different beheaivor depending on if i run all the test of my TestProject or Testing only this units by pressing STRG+R, T.
By using CTRL+R, T, all tests of the class will succeed. By running all the tests of the testproject, they will fail because they can't find the file. By right-clicking on the Testclass in the solution-explorer and click "Run Unit-Tests", they will also fail.
I configured the file correctly. It will "always copy". More strangely, switching the deployment-flag in the testconfigurations will also invert the results.