PBAutoBuild execution shows Error: Invalid executable file name

Symptom

When you execute PBAutoBuild, the command window shows Error: Invalid executable file name.

 

Environment

PowerBuilder 2021

PowerBuilder 2022

Cause

This is because the file name specified for ExecutableFileName in the Build.json file is incorrect. For example, the file name specified in the following screenshot is \\Build\\salesdemo2.exe, however, this path is relative to the PBT file path, so if the PBT file does not contain the build subdirectory, this error will be reported.

Note: In the Build.json file, the items in the SourceControl section that specify the path are relative to the path of the JSON file. The relative paths specified in the Projects section are based on the path where the PBT file resides.

Solution

Please modify the file name for ExecutableFileName to specify only the EXE file name without any path, or use an absolute path and file name.