anchor.diff:        ("v1.1", ["11"; "net11"])    
         ("v1.0", ["10"]) ] 
   
  -let GenerateItemGroup (fxLibs : DirectoryInfo) =
  -    let pkgDir = WorkspacePackageFolder ()
  +let GenerateItemGroupContent (pkgDir : DirectoryInfo) (files : FileInfo seq) =
       seq {
  -        let dlls = fxLibs.EnumerateFiles("*.dll")
  -        let exes = fxLibs.EnumerateFiles("*.exes")
  -        let files = Seq.append dlls exes
           for file in files do
               let assemblyName = Path.GetFileNameWithoutExtension (file.FullName)
               let relativePath = ComputeRelativePath pkgDir file
  
positive.code:                     XElement(NsMsBuild + "Private", "true"))
      }
  
  let rec GenerateWhen (folders : string list) (fxVersion : string) (libDir : DirectoryInfo) =
      match folders with
      | [] -> null
      | fxFolder::tail -> let fxLibs = libDir |> GetSubDirectory fxFolder
                          if not <| fxLibs.Exists then GenerateWhen tail fxVersion libDir
                          else
                              let itemGroup = GenerateItemGroup fxLibs
                              if itemGroup.Any() then
                                  let condition = sprintf "'$(TargetFrameworkVersion)' == '%s'" fxVersion
                                  XElement(NsMsBuild + "When",
                                      XAttribute(NsNone + "Condition", condition),
                                      XElement(NsMsBuild + "ItemGroup", 
                                          itemGroup))
                              else
                                  null
  
  let GenerateTargetForAllFxVersion (package : Package) (libDir : DirectoryInfo) =
      seq {
          for (fxName, _) in FxVersion2Folder do
              let fxWhens = FxVersion2Folder |> Seq.skipWhile (fun (fx, _) -> fx <> fxName)
                                             |> Seq.map (fun (_, folders) -> GenerateWhen folders fxName libDir)
              // TODO: manage portable libs here
              let fxDefaultWhen = [ [""] ] |> Seq.map (fun folders -> GenerateWhen folders fxName libDir)
              let fxWhen = Seq.append fxWhens fxDefaultWhen |> Seq.tryFind (fun x -> x <> null)
  
              match fxWhen with
              | Some x -> yield x
              | None -> ()
      }
  
  let GenerateDependencyImport (dependencies : string seq) =
  
negative.code:     let xnuspec = XDocument.Load (nuspecFile.FullName)
      let dependencies = GetPackageDependencies xnuspec
  
      let whens = GenerateTargetForAllFxVersion libDir
      let imports = GenerateDependencyImport dependencies
      let choose = if whens.Any() then XElement (NsMsBuild + "Choose", whens)
                   else null
  