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.
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.
相关文章推荐
- kubernetes1.4 基础篇:Learn Kubernetes 1.4 by 6 steps(3):Step 2. Using kubectl to Create a Deployment
- Why is using BufferedInputStream to read a file byte by byte faster than using FileInputStream
- Step-by-step guide on File-to-IDoc using SAP PI 7.0
- (By Marco Nanni)Using XML to Improve File-Upload Processing
- 解决编译报错:Unable to copy file, because it is being used by another process.
- Step-By-Step Guide To Create Physical Standby On Normal File System For ASM Primary using RMAN
- Bug on Build Solution: "Unable to copy file... because it is being used by another process.."
- Using mmap to Copy an Arbitrary-sized Disk File to stdout
- Step-By-Step Guide To Create Physical Standby On Normal File System For ASM Primary using RMAN (文档 I
- Slow performance occurs when you copy data to a TCP server by using a Windows Sockets API program
- Write a program to copy its input to its output, replacing each tab by \t, each backspace by \b, and each backslash by \\. This makes tabs and backspa
- Slow performance occurs when you copy data to a TCP server by using a Windows Sockets API program
- How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) file
- How to copy a datafile from ASM to a file system not using RMAN (Doc ID 428893.1)
- Step By Step guide to Read XML file in Java Using SAX Parser Example
- HOW TO: Upload a File to a Web Server in ASP.NET by Using Visual Basic .NET
- How to copy a datafile from ASM to a file system not using RMAN
- Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank.
- 转:Manage Web.config from XML File by using configSource attribute ASP.Net 2.0
- 错误处理——According to TLD or attribute directive in tag file, attribute test does not accept any expre