Hi all,
I am trying to accomplish nightly builds and in that i need to automatically increment build number. We have a custom xml file which is already being used by installer and update installer to properly update target system. Before this Nightly Builds, we used to update this file manually and versions of the assembly were manually updated and checked in to the source control (TFS 2008) server. Then builds were fired.
Here is the xml file
<?xml version="1.0" encoding="utf-8"?>
<MyProduct>
<Id>702002</Id>
<Version>v.3.0.13</Version>
<Build>3.0.13</Build>
</MyProduct>
I have tried to read using Microsoft.Sdc.Tasks and AssemblyInfo tasks. But probably i am unable to accomplish anything via able.
Here is what i want to do:
1. Read the Build Value i.e 3.0.13
2. Increment 3.0.13 to 3.0.14
3. Save the incremneted value for further updating AssemblyInfo.cs files
Kindly share any code that can help. i have tried using Xml.Parse, Xml.GetValue Methods from Sdc tasks but no success.
Here is the code i tried:
<Xml.GetValue
Path="D:\Data\TM\Projects\Development\Main\Web\Auth\MyProduct.xml"
XPath="/MyProduct/Build" >
<Output TaskParameter="Results" ItemName="ResultsItem" />
</Xml.GetValue >
But the "Results" as well as ResultsIem turns out to be empty.
Moreover, i have to idea how to increment build number.
I have tried a number of examples over the internet but wasn't successfull somehow.
Kindly suggest a solution. I must also mention that i must update the existing xml file as it is being used by our legacy update installer. So i must also update it besides updating the assemblyinfo.cs files.
Thanks
Steve