7

I want to deploy all files in folders which are in a directory within a unit-test. To deploy eacht item through the DeploymentItem-Attribut is too much.

I tried something like

[DeploymentItem(".\\")]

or

[DeploymentItem("*.*")]

but both don't work.

Does anybody knows how i can deploy all files with all subfolders by the Deployment-Attribut?

Tomtom
  • 9,087
  • 7
  • 52
  • 95

1 Answers1

3

DeploymentItemAttribute does not take a pattern to search and deploy. Read more about it here

You need to use each of the file names for the same or create a custom attribute which takes a pattern and deploys the item to our output directory.

Akanksha Gaur
  • 2,636
  • 3
  • 26
  • 50
  • 12
    The link that you provided appears to suggest that you can do: [DeploymentItem(@"Testfiles\")] Copies all the files and folders in the Testfiles folder from the build output folder to the deployment folder. Subfolders are replicated in the deployment folder. – Carl Jul 08 '15 at 09:14