Read LabVIEW Application Builder User Guide, I found this out recently myself, so I told myself RTFM
There are some caveats:
If the VI loads other VIs dynamically using the VI Server or Call By
Reference Nodes, make sure the application or shared library creates
the paths for the VIs correctly. When you include the dynamically
loaded VIs in the application or shared library, the paths to the VIs
change. For example, if you build foo.vi into an application,
its pathis C:\..\Application.exe\foo.vi, where
C:\..\Application.exe represents the path to the application
and its filename.
Another trick: Help -> explain error