And since I'm using Visual Studio 2005, I don't need to modify the unit test project's Post-Build Event script text to copy/rename the app.config in the output folder because VS does that now.
The problem I ran into was that the config file wasn't getting picked up. I double-checked to make sure the configuration was correct and that the config file was being copied/renamed properly, but it still didn't work. After futzing around with it a bit more, I determined that app.config needs to be copied/renamed the same as the .nunit file name and location.
And to make the arrangement portable across projects, I name the .nunit file the same as the VS project nams. So now my Post-build Event script now looks like this:
:: This script copies and renames app.config to
:: so that the NUnit GUI application will consume it.
:: Example:
:: MyTestProject.nunit
:: MyTestProject.config
copy /Y "$(ProjectDir)app.config" "$(ProjectDir)$(ProjectName).config"
Solved!
No comments:
Post a Comment