Automatic copy files to output during application building

后端 未结 8 1859
死守一世寂寞
死守一世寂寞 2020-12-07 22:48

There is Copy to Output Directory property for files in C# projects. But in VC++ projects it is absent. I know, that I can use Build events in VC++ and wri

8条回答
  •  星月不相逢
    2020-12-07 22:58

    In Visual Studio 2017 you can do this in the IDE. I am not sure about earlier versions.

    Simply add the file as an included project file so it shows in the Solution Explorer. Then right click on the file and select the Properties menu.

    Change the Content to "Yes" and change the Item Type to "Copy file"

    If you look at the changes it made to the project file you can see it added this:

    
      
        true
        Document
      
    
    

提交回复
热议问题