Skip to content

Instantly share code, notes, and snippets.

@chaliy
Created January 28, 2010 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaliy/288818 to your computer and use it in GitHub Desktop.
Save chaliy/288818 to your computer and use it in GitHub Desktop.
open System.Xml.Linq
let xn n = XName.Get(n, "http://schemas.microsoft.com/developer/msbuild/2003")
let xattrn n = XName.Get(n)
let xelem name (x:XElement) = x.Element(xn name)
let xattr name (x:XElement) =
x.Attribute(xattrn name).Value
let load (proj : XElement) =
let references = proj.Descendants(xn "DefinedReference")
{
References =
references
|> Seq.map (fun x ->
{
Id = x |> xattr "Id";
Assembly = x |> xattr "Assembly"
})
|> Seq.toList
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment