anchor.diff:          | "0" -> ()
           | versionStr -> dep.SetAttributeValue(XName.Get "version", versionStr)
           dep
  -    
  -    let buildDependenciesNode dependencyList = 
  +
  +    let buildDependenciesNode dependencyList =
           if dependencyList = [] then () else
           let d = XElement(ns + "dependencies")
           dependencyList |> List.iter (buildDependencyNode >> d.Add)
           metadataNode.Add d
   
  -    let buildReferenceNode (fileName) = 
  +    let buildReferenceNode (fileName) =
           let dep = XElement(ns + "reference")
           dep.SetAttributeValue(XName.Get "file", fileName)
           dep
   
  -    let buildReferencesNode referenceList = 
  +    let buildReferencesNode referenceList =
           if referenceList = [] then () else
           let d = XElement(ns + "references")
           referenceList |> List.iter (buildReferenceNode >> d.Add)
           metadataNode.Add d
  -    
  +
       !! "id" core.Id
       match core.Version with
       | Some v -> !! "version" <| v.ToString()
  
positive.code:         zipFile.CreateEntryFromFile(source,path) |> ignore
  
      let ensureValidTargetName (target:string) =
          let target = 
            target.Replace(" ", "%20").Replace("\\", "/")
            |> fun s -> if s.StartsWith("./") then s.Remove(0,2) else s
  
  
negative.code:     r "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" ("/" + corePropsPath) corePropsId
      XDocument(declaration, box root)
  
  let xDocWriter (xDoc : XDocument) (stream : System.IO.Stream) =
      let settings = new XmlWriterSettings(Indent = true, Encoding = Encoding.UTF8)
      use xmlWriter = XmlWriter.Create(stream, settings)
      xDoc.WriteTo xmlWriter
      xmlWriter.Flush()
  
  let writeNupkg  (core : CompleteCoreInfo) optional =
      [ core.NuspecFileName, nuspecDoc(core,optional) |> xDocWriter
        corePropsPath, corePropsDoc core |> xDocWriter
        relsPath, relsDoc core |> xDocWriter ]
  
  let Write (core : CompleteCoreInfo) optional workingDir outputDir =
      let outputPath = Path.Combine(outputDir, core.PackageFileName)
      if File.Exists outputPath then
          File.Delete outputPath
  