If the input *.wxs contains "]]>" in element content, encoded as e.g. "]]>", then candle fails. Apparently, the preprocessor tries to wrap every piece of text in a CDATA block, but CDATA cannot contain the "]]>" sequence. The easiest fix would be to change the preprocessor not to use CDATA.
Microsoft (R) Windows Installer Xml Compiler version 3.0.4014.0
Copyright (C) Microsoft Corporation 2003. All rights reserved.
cdata.wxs
candle.exe : error CNDL0001 : Cannot have ']]>' inside an XML CDATA block.
Exception Type: System.ArgumentException
Stack Trace:
at System.Xml.XmlTextWriter.WriteCData(String text)
at Microsoft.Tools.WindowsInstallerXml.Preprocessor.PreprocessReader(Boolean include, XmlReader reader, XmlWriter writer, Int32 offset)
at Microsoft.Tools.WindowsInstallerXml.Preprocessor.Process(String sourceFile, Hashtable variables)
at Microsoft.Tools.WindowsInstallerXml.Tools.Candle.Run(String[] args)
sample input to trigger the bug
another test case
Logged In: YES
user_id=1102079
Originator: YES
File Added: cdata2.wxs
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 15 days (the time period specified by
the administrator of this Tracker).