0

I have a test project with the TestData folder, where are a lot of .txt and .csv test files are located and used by the tests. Is there any way to mark/emphasize the TestData folder, so that all the files in it are Content and Copy if newer.

My intention is to have something like a "resource" folder, without a need of configuring file properties (Build Action to Content and Copy to Output Directory to Copy if newer) every time we add new test data.

Uladzimir Sharyi
  • 144
  • 1
  • 14
  • Possible duplicate of [Copy file(s) from one project to another using post build event...VS2010](https://stackoverflow.com/questions/11001822/copy-files-from-one-project-to-another-using-post-build-event-vs2010) use `xcopy` to build your files before or after build – Pavel Anikhouski Aug 08 '19 at 12:45
  • Hi, @PavelAnikhouski, thanks for this. Looks like it can be adjusted through the MSBuild configuration. – Uladzimir Sharyi Aug 08 '19 at 13:52

1 Answers1

0

Are you able to make a copy of the TestData folder and call it TestDataCopy? That way, you can compare the contents of both folders to see if anything has changed. If there is a change, you can copy the changed contents from TestData to TestDataCopy.

Gary Burch
  • 31
  • 2
  • Hi, @Gary, my question is not about comparing files. I have a lot of files for my tests, and I don't want every time to set the appropriate properties (see in the question) for every new file. I would have a "resource folder" where they are located. – Uladzimir Sharyi Aug 08 '19 at 12:57