I have some one-off integration tests that read flat files off the file system to make sure the reader works properly against a known good file. My data file is included in the test project and set to copy to output folder if newer. However, it appears NCrunch is not copying the data file to the temp runner directory it's creating in AppData/Local/... So I get a FileNotFoundException
Build/Test Issues
content files set to copy to output folder not copied to temp runner directory
Started by mattflo on 10,283 views
After a bit more exploration. My problem is the file isn't included in the same project as the test. But instead it is included in a project the test project references. So when Visual Studio builds the output file is copied from the depended projects output folder to the test projects output folder. When I include the file in the test project and set to copy to output folder, everything works fine.
Remco NCrunch Developer
#23
11 May 2011 20:05 UTC
This makes sense. NCrunch will separate the output assemblies into different workspaces. Where your manual test runner probably dropped the files in the same place as your test assembly, the NCrunch's behaviour would have made this slightly different. I'm glad you managed to work it out :) Often it can be useful to thumb through the workspaces in explorer to see what's going on in the test environments.
Post a reply
Log in to reply.