"Copy to output directory" in a C ++ / CLI project

How do I get the "Copy to output directory" property for content files in a Windows Forms C ++ / CLI project?

alt text

Edit: I am currently using the post-build event to copy my content files.

+4
source share
1 answer

On project property pages, use post-build events to run the bat file or batch file to copy the file to the output directory.

See the MSDN article on Build Events

Edit

Have you checked this question Visual Studio Custom Build Rule? It looks like this might work for you, set up a custom build step (i.e. copy a file) and associate it with the file types of your custom content files.

Then, when you add another file, you do not need to change the post-build step. I don't do C ++ anymore, and I did not know that you can do this, it's nice to know that there.

Hope this helps,

+4
source

Source: https://habr.com/ru/post/1285793/


All Articles