Solution
There are several potential causes of this error, including a security software interfering with the build operation, an invalid or corrupted icon being used or a corrupted installation. You can try the following troubleshooting steps.
- Change the build destination folder to a different one, this can help determining if the permissions of the build location is affecting the build operation.
- Try building a dummy application in a test project to verify if the problem persists regardless of project.
- If it only happens in a specific project, try performing a Mass Compile of the LabVIEW project.
- If you are using a custom icon, try using the default icon instead when configuring the Icon Page in the build specification.
- If the build fails only with your custom icon, make sure it is a valid icon (up to 256×256 pixels and up to 32-bit color). Try creating the icon again in case the icon file got corrupted and try building the application again.
- If this happens with the default icon, replace try replacing the lvapp.ico with a copy from a working installation if available.
- Temporarily disable the antivirus or security software in the computer. The antivirus may interfere mid-way the building process causing temporal files to be blocked, not allowing LabVIEW to successfully build the application. If disabling it is not an option, check with your IT department the logs of the security software and make exclusions as needed.
- For example, Windows Defender might detect a temporal file used by LabVIEW in the build folder as a threat, causing the build to fail. In the case of Windows Security, the build folder can be added as an exception to avoid this (refer to Microsoft documentation: Add an exclusion to Windows Security)
- In some cases when disabling the security software is not an option, these steps can be used as a workaround:
- Navigate to C:\<Program Files>\National Instruments\<LabVIEW version>\vi.lib\Platform and double click the icon.llb. This will launch the LabVIEW LLB Manager.
- Open the Write Icons to Application.vi and in the block diagram, increase the number of iterations of the for loop from 3 to a higher number (e.g. 20). This will allow the Application Builder to attempt to write the icon more times, increasing the chances of success.
- Save and close this VI, then attempt to build your application again.
- Make sure the location of your build or build folder is not open in a Windows Explorer window or a different program is blocking the folder.
- Make sure the same build folder for multiple versions of the same application is not reused. If you need to update and re-build a project, use a new folder name.
- This can be done using Version Tags to automatically append a version number to the folder name.
- If you aren't using version tags, un-check Auto-increment version on build in the Version Information page of the build specification.
- Some characters in file names are known to cause unexpected errors, such as \ / : * ? " < > | . Make sure these characters do not appear in the names of VIs or files that are in the project.
- If you are using LabVIEW 2020 or earlier, upgrade to LabVIEW 2020 SP1 or later.
- Repair or re-install LabVIEW.