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
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.

1 Like

After updating several VCL components, my programs could not find several components anymore.
It took some time before I noticed that:

  1. TMS WEB Core adds it paths without noticing that the paths already existed: so they double everytime you reinstall it.
  2. Some paths use the abreviation of $(TMSREG) and others are have the complete path (C:\Users......\registered\TMS etc)
  3. By reviewing the IDE\Language\Delphi\Library\ path directories it is very usefull to use the Tasks button to remove duplicates (Although the order gets heavily reordered)

Question to 2: Is it OK to manualy replace "C:\users......\registered" by "$(TMSREG)" or does it break something else?

For 1)
We are not aware of this. Are you 100% sure you didn't modify the path as it will only remove the path when it is 100% identical to what it installed.
For 2)
We have been introducing step by step in product installers path shortening via using the $(TMSREG) environment variable.
I suggest not to replace this manually as the uninstaller for older installers won't find the path it added to remove it again.
For 3)
I'm not sure I understand what you mean here or what the question is

I also have duplicated paths.
it looks like every time i make an new installation.
So looks like a problem with the installer.

See snapshot of libarary path attached.

Thank you

Do you uninstall by running the uninstaller from the Windows Control Panel Add/Remove software?

Hello Bruno

Normally I use the TMS Subcription Manager v2.2.0.0 to handle all my TMS installs as it also prompts me to un-install the old versions automatically.

Thank you

This could be the reason for the issue.
For now, we recommend to perform the uninstall first via the Windows Control Panel.