Note that there are some explanatory texts on larger screens.

plurals
  1. POMSBuild 4.0 failing on XMLQuery task (from MSBuild Community Tasks package) with error MSB4018
    primarykey
    data
    text
    <p>We use MSBuild to run a project which, among many other things, reads some values from an XML file by means of the XMLQuery task from the Community Tasks package. It worked fine under MSBuild 3.5 but when run under 4.0 it fails with the following message:</p> <p>error MSB4018: The "XmlQuery" task failed unexpectedly. System.Xml.XmlException: Name cannot begin with the '%' character, hexadecimal value 0x25. Line 1, position 2. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32&amp; colonPos) at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space) at System.Xml.XPath.XPathDocument..ctor(TextReader textReader) at MSBuild.Community.Tasks.Xml.XmlQuery.loadXmlContent() at MSBuild.Community.Tasks.Xml.XmlQuery.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean&amp; taskResult)</p> <p>The code used to call XMLQuery from within a build target:</p> <pre><code>&lt;!-- Read XML report --&gt; &lt;ReadLinesFromFile File="coverageXML\symbolmodule.xml"&gt; &lt;Output TaskParameter="Lines" ItemName="XmlReportLines" /&gt; &lt;/ReadLinesFromFile&gt; &lt;!-- Get number of visited sequence points --&gt; &lt;XmlQuery Lines="@(XmlReportLines)" XPath="/trendcoveragedata/stats/@vsp"&gt; &lt;Output TaskParameter="Values" PropertyName="VisitedSequencePoints" /&gt; &lt;/XmlQuery&gt; </code></pre> <p>I just can't understand what's wrong. The XML file is perfectly valid and the XPath specified in the XMLQuery should return a value (and always has). I can't find a single % character <em>anywhere</em>.</p> <p>I'm not sure how and where to start troubleshooting this issue... Any pointers in the right direction are appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload