I am trying to read a value from an XML file from FAKE, but I am getting an error, i.e.
.fsx(9,16) : eror FS000: Incomplete structurd construct at or before this
point in expression. Expected '->' or other token.
Below is my code, I use XMLHelper.XMLReadto read values ββfrom an XML file.
#r "./packages/FAKE/tools/FakeLib.dll"
open Fake
open Fake.XMLHelper
Target "BuildMain" (fun _ ->
for s in XMLHelper.XMLRead true "D:/test/Version.Config" "/version/major/minor"
trace s)
"BuildMain"
RunTargetOrDefault "BuildMain"
Below is my xml file:
<version>
<major number="2">
<minor>1</minor>
<build>1</build>
<revised>1</revised>
</major>
</version>
Here I am trying to read a value from a younger version, and, in addition, I can save this value in a variable so that I can use it later
source
share