Post Build exited with code 1

后端 未结 18 1853
囚心锁ツ
囚心锁ツ 2020-12-04 16:11

I have a project with a post build event:

copy $(ProjectDir)DbVerse\\Lunaverse.DbVerse.*.exe  $(TargetDir)

It works fine every time on my m

相关标签:
18条回答
  • 2020-12-04 16:49

    Get process monitor from SysInternals set it up to watch for the Lunaverse.DbVerse (on the Path field) look at the operation result. It should be obvious from there what went wrong

    0 讨论(0)
  • 2020-12-04 16:51

    She had a space in one of the folder names in her path, and no quotes around it.

    0 讨论(0)
  • 2020-12-04 16:52

    For me I had to make sure the the program I was coping file to was not running at the time. There weren't any errors in the syntax. Hope this helps someone.

    0 讨论(0)
  • 2020-12-04 16:53

    I was able to fix my Code 1 by running Visual Studio as Admin. Apparently it didn't have access to execute the shell commands without Admin.

    0 讨论(0)
  • 2020-12-04 16:54

    In my case I had to cd (change directory) before calling the bat file, because inside the bat file was a copy operation that specified relative paths.

    :: Copy file
    cd "$(ProjectDir)files\build_scripts\"
    call "copy.bat"
    
    0 讨论(0)
  • 2020-12-04 16:55

    For those, who use 'copy' command in Build Events (Pre-build event command line or/and Post-build event command line) from Project -> Properties: target folder should exist

    0 讨论(0)
提交回复
热议问题