Visaul Studio에서 빌드 후에 매번 특정 파일을 빌드후 특정 폴더 (data) 에 특정 파일(예를 들어 XML 파일)을 복사해야 하는 경우가 있다.
이럴 경우 아래 처럼 윈도우 command를 이용하면 좋다
SET mypath="$(OutDir)\Data"
echo %mypath%
SET binPath="$(TargetDir)Data"
echo %binPath%
echo "$(SolutionDir)Data\stickyNoteConfig.xml"
if not exist binPath (
mkdir "Data"
)
copy "$(SolutionDir)Data\stickyNoteConfig.xml" "Data\stickyNoteConfig.xml"
위 배치 파일을 Post-build event command line: 에 넣어서 사용하면 된다.
출처 : 다년간의 프로그래밍 경험
'C#(CSharp) > Etc' 카테고리의 다른 글
Microsoft Visual Studio Installer in VS2013 (0) | 2015.03.21 |
---|---|
Microsoft Visual Studio Installer Projects Support VS2013 (0) | 2015.03.21 |
XSD -> Class 사용하기 (0) | 2015.03.17 |
XSD <-> XML 상호 관계 (0) | 2015.03.17 |
IIS에 PHP 모듈 설치 후 동작하지 않을 때 (0) | 2015.03.13 |