Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a class library project which has a .xml file. It's property is set to "Copy Always" to "Output Directory". After building the project the file is getting copied to the output directory.

but when I'm using this dll in other applications,the .xml file is not being copied to their output directories.

How can I do that?

What I have tried:

the file is set to "Copy Always" to "Output Directory".
Posted
Updated 13-Dec-21 20:26pm
v2
Comments
Richard MacCutchan 1-Sep-16 3:26am    
You need to change the properties of the file in your project.
Member 12704287 1-Sep-16 3:49am    
can you explain what to change in the property?
Richard MacCutchan 1-Sep-16 4:09am    
You already know what: Copy Always
Member 12704287 1-Sep-16 4:17am    
I've already done that. It didn't work
Richard MacCutchan 1-Sep-16 4:55am    
Sorry, but if you want help here you need to provide proper details of your problem. We have no way of guessing where your files are or what you are doing.

Also set the Build Action to Content.
 
Share this answer
 
Comments
Member 12704287 1-Sep-16 4:24am    
It is set to Content already
you can use the post build if you are using VS, you can add a post build event like
xcopy "$(ProjectDir)Views\ModuleAHome\Index.xml" "$(SolutionDir)MEFMVCPOC\Views\ModuleAHome\" /Y /I
 
Share this answer
 
Comments
Richard Deeming 14-Dec-21 5:11am    
Read the question and comments again. It's not a problem when the project is built; it's a problem when the compiled output of the project is referenced in another project.

The OP doesn't seem to have been back in the five years since they asked this question, so either they found a solution or workaround, or they gave up.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900