Knowledgebase: Install problems due to MSBUILD command-line length limit

Our product installers use MSBUILD to compile the packages during install for the selected IDEs, as recommended by Embarcadero
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Building_a_Project_Using_an_MSBuild_Command
In order to build with MSBUILD, the MSBUILD tool will pickup the library path configured in the IDE and use it to install.
There is however a limitation that the total command-line length for MSBUILD cannot be more than 32000 characters.

If you have installed many component packages, this limit might be reached. You will see in the installer log file (see .log file under c:\users<USERNAME>\AppData\Local\tmssoftware) an error similar to:

warning MSB6002: The command-line for the "LC" task is too long. Command-lines longer than 32000 characters are likely to fail.

To solve this:

  1. sanitize your IDE library path and remove all unused paths
  2. choose a short path for installing components, for example choose C:\tms\productname instead of C:\users<USERNAME>\AppData\local\tmssoftware\productname

After cleanup of the library path, retry to run the installer.
You can also always test running MSBUILD directly from the command-line to see if it works again.