Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

content files set to copy to output folder not copied to temp runner directory
mattflo
#1 Posted : Wednesday, May 11, 2011 2:46:47 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/11/2011(UTC)
Posts: 6
Location: Plano, TX

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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
mattflo
#2 Posted : Wednesday, May 11, 2011 4:00:06 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/11/2011(UTC)
Posts: 6
Location: Plano, TX

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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
#3 Posted : Wednesday, May 11, 2011 8:05:42 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,147

Thanks: 961 times
Was thanked: 1294 time(s) in 1200 post(s)
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.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.027 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download