Skip to content

Instantly share code, notes, and snippets.

@nikolaia
nikolaia / consolidate.fsx
Last active October 8, 2018 10:58
Ensure that NuGet Packages (packages.config) are consolidated
type PackageReferenceFile = NuGet.PackageReferenceFile
Target "NuGetPackagesConsolidated" <| fun _ ->
!! (sprintf "./src/%s*/packages.config" appName)
-- "**/obj/**/packages.config"
|> Seq.map PackageReferenceFile
|> Seq.collect (fun prf -> prf.GetPackageReferences())
|> Seq.groupBy (fun pr -> pr.Id)
|> Seq.filter (fun p -> (snd p |> Seq.distinct |> Seq.length) > 1 )
|> Seq.map (fun p -> fst p , snd p |> Seq.distinct)
|> function

Keybase proof

I hereby claim:

  • I am nikolaia on github.
  • I am nikolaia (https://keybase.io/nikolaia) on keybase.
  • I have a public key ASAlIkzL8AtPPn04N-ZzET5FA5KqQcC6yYYT6zJeYoGAQQo

To claim this, I am signing this object: