views:

41

answers:

1

I can't seem to grasp how MSTest deployment items are supposed to be configured. I have been able to get them working properly by modifying the project's test settings file, but this is less then ideal -- the deployment item configuration is separated from individual tests, and the file paths appear to be stored as absolute paths unless the files are under the solution folder.

Am I not supposed to be able to add a deployment item using the [DeploymentItem] attribute on either a [TestClass] or [TestMethod] without having to create/modify a project test settings file? How do I accomplish this?

(Frankly, I don't understand the need for a separate deployment item configuration -- why not just use the existing 'Copy to Output Directory' settings for project files that should be deployment items?)

A: 

If you need separate deployment item in individual test cases then please go ahead and use [DeploymentItem("string file path")] attribute in each test cases.

Pritam Karmakar
My problem, though, is that the DeploymentItem attribute isn't working.
arathorn