Visual Studio에서 빌드시에 특정 파일을 debug / release 폴더에 복사하고 싶을때.


해당 파일이 빌드후 결과로만 같이 있기만 할 경우엔 post-build를 / 그전에 필요한 경우라면 pre-build 이벤트에 명령어(command)를 넣어주면 된다.

하기는 다음의 예제이다.


프로젝트의 2개 파일을 빌드 결과 폴더로 복사한다.


copy /Y "$(SolutionDir)\SampleProjectr\ApplicationSetting.xml" "$(TargetDir)ApplicationSetting.xml"

copy /Y "$(SolutionDir)\SampleProject\Resources.xml" "$(TargetDir)Resources.xml"

상위 경로를 사용한다면

copy /Y "..\..\multiRegion.Ini" "$(TargetDir)multiRegion.Ini" - 20.5.15


by 무위자연 2016. 1. 18. 14:04