The Icon "lvapp.ico" Could Not Be Written to the Application

Updated Jun 25, 2020

Reported In

Software

  • LabVIEW Application Builder Module
  • LabVIEW

Issue Details

When I try to build an application, either no icon shows up such that I cannot build an installer, or I receive a build error with the following text listed under Possible reasons:

The icon at C:\Program Files\National Instruments\LabVIEW 2017\appLibs\lvapp.ico could not be written to the application. Verify the icon is at the expected location. If using the default icon, please contact National Instruments technical support with this information.

The build error also lists the following text under Details:

Click the link below to visit the Application Builder support page. Use the following information as a reference:

Error 1 occurred at AB_Engine_EXE_Call_Write_Icons.vi -> AB_EXE.lvclass:Build.vi

Possible reason(s):

LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.

 


How do I resolve this error?

Solution

There are several potential causes of this error, all relating to the location of your application build folders.

  • Make sure the location of your build or build folder is not open in a Windows Explorer window.
  • Make sure the 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 Number in the Version Information tab of the Application Builder.
  • Changing the build destination folder to above the Windows User level.
  • Perform a Mass Compile of the project.
  • Try building just a blank application to see if the problem persists regardless of project.
  • Some characters in file names are known to cause weird errors, such as \ / : * ? " < > | . Make sure these characters do not appear in the names of VIs or files that are in the project.
  • Replace lvapp.ico with a copy from a working version of Application Builder.
  • Disable the antivirus on the computer. The antivirus may interfere mid-way the building process. 
  • If disabling the antivirus is not an option, then perform the following steps:
    • Navigate to C:\Program Files (x86)\National Instruments\LabVIEW 201X\vi.lib\Platform and double click on the icon.llb. This will launch the LabVIEW LLB Manager.
    • Open the Write Icons to Application.vi and on 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 > Attempt to build your application again.  
  • Try force reinstalling LabVIEW Application Builder.
  • Re-install LabVIEW.