Visual Studio中“后期生成事件命令行” 中使用XCopy命令

将程序所依赖的动态库与其他依赖文件做了分类,使用XCopy命令自动生成相应的目录结构。

set source="$(TargetDir)"
set output="$(SolutionDir)station_release_files"
set appname=$(TargetFileName)

echo %output%

if exist %output% (rd %output% /s /q) else (md %output%)

echo f | xcopy %source%%appname%.config %output%\%appname%.config /y
echo f | xcopy %source%%appname% %output%\%appname% /y
echo f | xcopy %source%wasdkconfig.xml %output%wasdkconfig.xml /y
echo f | xcopy %source%NLog.config %output%NLog.config /y

echo d | xcopy %source%*.dll %output%libs /y
echo d | xcopy %source%*.mrt %output%
eport /y
echo d | xcopy $(SolutionDir)packagesSQLite.3.13.0
untimeswin7-x64
ativesqlite3.dll %output%libs /y

echo 版本生成成功:%output%
原文地址:https://www.cnblogs.com/sela/p/7717403.html