Automatic copy files to output during application building

后端 未结 8 1858
死守一世寂寞
死守一世寂寞 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 23:15

    It depends on what version of Visual Studio you are using. Format of VC++ project file in Visual Studio 2008 is not MSBuild and so using xcopy in PostBuildStep is a good choice.

    VC++ project in Visual Studio 2010 has MSBuild format. Thus, there is functionality of MSBuild Copy task.

    Below is a sample:

    
    

    If the destination directory does not exist, it is created automatically

    An MSDN Copy task reference is here

提交回复
热议问题