Tomtom
Tomtom

Reputation: 9394

DeploymentItem-Attribut for all files and folders in folder

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?

Upvotes: 7

Views: 7269

Answers (1)

Akanksha Gaur
Akanksha Gaur

Reputation: 2686

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.

Upvotes: 3

Related Questions