LabVIEW Error 1502 When Building an Application

Updated Feb 25, 2020

Reported In


  • LabVIEW Application Builder Module
  • LabVIEW

Issue Details

I get error 1502 when trying to build an application with LabVIEW:

An error occurred while building the following file:

<File Path>

The VI became broken during the build process. Open the Build Specification and enable debugging to include the front panel and block diagrams.



Error 1502 occurs when the Application Builder attempts to load VI dependencies or block diagrams after the they have been removed from the build. 

There are several settings in the Source Distribution Properties Dialog Box which typically resolve this issue. Changing these settings will slightly increase the size of the application. However, it will not greatly affect execution speed.
  • The first option is to include the front panel and block diagram of the VI that is causing the error.  Navigate to the Source File Settings category and select the VI that is causing the error. Uncheck the Remove block diagram box. If the VI is not listed in the Project Files section, then select Dependencies. Uncheck the Remove front panel and Remove block diagram boxes
  • Uncheck the following settings in Additional Exclusions as seen in the screen shot below: Disconnect type definitions and Remove unused members of project libraries 
  • Another option that can be effective for solving this problem is to Enable debugging in the Advanced category. Checking this option will include block diagrams that will greatly increase the application size (by approximately double), but will almost certainly resolve this error.
  • Another reason this problem could be occurring is if there are dependencies from a previous run time of LabVIEW that have been deprecated for your current version. Make mass compile your project following the indications provided in How to Mass Compile in LabVIEW.
  • This error is commonly caused by building an application from a VI that has code which will never execute; for example, having a constant wired to the selector terminal of a case structure. In addition, this may be caused by deleting or removing SubVIs and dependencies from the project that may still be loaded in memory.
    • If you continue to run into issues with your subVIs not executing after resolving this error, try unchecking Remove unused polymorphic VI instances and Disconnect unused inline subVIs under the Additional Exclusions section when building your executable.