编写项目Build Events的Pre-build、Post-build时如果使用copy命令必须为绝对路径,比如预定义宏OutDir,编写如下命令:

copy "$(SolutionDir)BuildLibrary" "$(OutDir)"

得到exit code 1的提示,因为$(OutDir)返回相对路径,比如:“Bin\Debug\”。相对路径无法成功执行,只需要修改为如下命令:

copy "$(SolutionDir)BuildLibrary" "$(TargetDir)"

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2021-08-09
  • 2021-06-27
  • 2021-07-02
  • 2022-12-23
  • 2021-09-05
  • 2021-06-26
猜你喜欢
  • 2021-06-24
  • 2021-11-15
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
相关资源
相似解决方案