visual studio 2010 - Test environment does not copy my files -
visual studio 2010 - Test environment does not copy my files -
i utilize vs2010. in test project have folder named "messageinstances" , in folder there subfolder "get_activity", within folder there xml files.
when run test, these files should copied accordingly out assembly dir, i.e. if out
folder test project output copied out\messageinstances\get_activity\
folder should filled xml files.
i tried different settings *.testsettings
file, tried running test resharper unit test runner , vs', neither copied files right folder. played deploymentitem
attribute , still no success.
what else can try?
the deploymentitem attribute work if build action on item set content , copy output directory set copy if newer or copy always. additionally, if tests running testsettings file need enable deployment in settings. create sure editing active test run config in case have mutiple.
your deploymentitem should defined follows:
[deploymentitem("messageinstances\\get_activity\\", "messageinstances\\get_activity")]
or using '@' instead of '\\'
[deploymentitem(@"messageinstances\get_activity\", @"messageinstances\get_activity")]
i.e. need specify output directory, otherwise files copied out directory of test run.
visual-studio-2010 unit-testing
Comments
Post a Comment