One of the tenets of software development is to fail early. The earlier something fails the less costly it is since you don't have as much invested as if it failed later. Visual Studio needs to learn this lesson.
I just spent the better part of an hour trying to figure out why a DeploymentItem attribute on a test didn't work. I had created some new files for the test, added them to the project and created an attribute that should have copied them over. The test didn't fail in the expected manner, because the code hadn't been updated to handle multiple files, but rather because there were no files at all. Setting a break point indicated that in fact the files were not being copied even though the were right there in the project.
After much frustration, I found through cygwin's grep the missing element: the files themselves needed to have their Copy to Output Directory property changed from Never to Every time. Why couldn't anything in the five steps leading up to the test execution have told me there might be a problem?
(And why did Explorer's Search fail to find the files that grep did?!?)
Welcome and thanks for visiting! You might be interested in subscribing to our RSS or Twitter article feeds.
If you prefer e-mail, you can subscribe by putting you e-mail here. This is never used for anything but letting you know when articles are published and you can opt out at any time.
If you prefer e-mail, you can subscribe by putting you e-mail here. This is never used for anything but letting you know when articles are published and you can opt out at any time.
Welcome back! We're so glad you enjoy our writing. If you especially like a particular article, please consider sharing it using the button at the bottom of each article. Thanks!
Wednesday, August 20, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment