您的位置:首页 > 运维架构

Copy file to output by using attribute: DeploymentItem

2012-11-20 16:30 561 查看
Problem:

When do debugging on UnitTest, can not read input from debug-output/assembly-output for there is no input data file[xml/config] file in output folder.

Solution:

How to fix it? DeploymentItem()

How to do:

1. Choose "XML" file, visit its property and set "Copy Always" in "Copy to Output Directory"

2. Check "Enable Deployment" in *.testsettings under [Solution Explorer\Solution Items]

3. Add "DeploymentItem(string path)"/"DeploymentItem(String Path, Ouput)" to your target as attribute

Then, It works.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐