XmlFile Class : TaskAction ="ReadElements"

May 29, 2012 at 10:46 PM

I am having trouble understanding how this works and I am look for a example.

Currently I get the following error> error : Invalid TaskAction passed: ReadElements

 

Given:

<?xml version="1.0" encoding="UTF-8"?>

<Deployment>

 <Server></Server>

<Server></Server>

</Deployment>

 

Use:

<MSBuild.ExtensionPack.Xml.XmlFile     

File="c:\Build\deployment.xml"     

XPath="//Deployment/Server"   

 TaskAction="ReadElements"> 

    <Output ItemName="MyItems" TaskParameter="Elements"/>   

</MSBuild.ExtensionPack.Xml.XmlFile>

 

 

Coordinator
May 29, 2012 at 11:07 PM

That's correct. you must be on a version older than the November 2011 release if you get that error. If this is the case, please upgrade. If not let me know as we may have  a bug

May 30, 2012 at 3:38 PM

Upgrade solved the issue.

 

Thanks