26 апреля 2012 г. 14:02
I added a file in the Deplyment section of the local.testsettings but it does not get copied to the deployment folder. I would like to access this local.testsettings programmatically during the testing in order to check if they are properly loaded and if the paths are the correct ones. Is it possible to do that ?
27 апреля 2012 г. 4:14
Have you set the 'Copy to Output Directory' property of the file to be deployed to 'Copy always'?
Right Click the file -> properties -> Copy to Output Directory -> change its value to 'Copy always'.
- Помечено в качестве ответа Tony xiaoModerator 4 мая 2012 г. 3:21
27 апреля 2012 г. 4:26Модератор
For deployment you could use deployitem attribute on top of test method, please refer to the following link from MSDN which is about this attribute detailed information:
Also consider into you want checking the deployment node in local.testsettings file, I don't think it's a good idea. After you add a file through deployment section the VS would add following node into Local.testsettings, there isn't any node about deployment directory:
<Deployment> <DeploymentItem filename="New Text Document.txt" /> </Deployment>
Tony Xiao [MSFT]
MSDN Community Support | Feedback to us