There is a VI @ /usr/local/lv80/vi.lib/AppBuilder/BuildTargetBuildSpecification.
The issue I am having is that when I run the above VI without compiling then I can Build any project by supplying the path of the project file. However when I convert the above VI to an executable then I get an error 1.
Has anyone faced this issue before and is there some solution for it.
This is actually the expected behavior. LabVIEW itself (the editor in this case) contains the compiler. The Run-Time Engine does not contain a compiler. For this reason, you can create excutables from LabVIEW, but not from any executable built by LabVIEW.
If you are looking for an automated way to build an executable, then I suggest creating a simple VI that contains the BuildTargetBuildSpecification.vi in it and set it to be runnable on open. (You will need to add some other code to add the settings and which project you want to build, maybe from a file or using command line arguements.) The run "/usr/local/lv80/labview <Path to Created VI>" and you will get your automated build. The Example Finder is actually built this way nightly.