Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Aug 18, 2017
1 parent 7fec854 commit 0bab2f8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Paket.Core/PaketConfigFiles/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1104,11 +1104,13 @@ module ProjectFile =

let usedFrameworkLibs = HashSet<TargetProfile*string>()

let httpPackage = PackageName "System.Net.Http"
let specialPackagesWithFrameworkConflictLibs =
[PackageName "System.Net.Http"] // see https://github.com/fsprojects/Paket/issues/2352
|> Set.ofList

let filteredModel =
completeModel
|> Map.filter (fun kv _ -> usedPackages.ContainsKey kv)


filteredModel
|> Seq.map (fun kv ->
Expand All @@ -1124,11 +1126,13 @@ module ProjectFile =
.FilterExcludes(installSettings.Excludes)
.RemoveIfCompletelyEmpty()

let group, packName = kv.Key
if packName = httpPackage then
let _, packageName = kv.Key
if specialPackagesWithFrameworkConflictLibs.Contains packageName then
for t in KnownTargetProfiles.AllProfiles do
if (projectModel.GetLibReferenceFiles t) |> Seq.exists (fun t -> t.Name = "System.Net.Http.dll") then
usedFrameworkLibs.Add(t,"System.Net.Http") |> ignore
if (projectModel.GetLibReferenceFiles t)
|> Seq.exists (fun t -> t.Name = packageName.ToString() + ".dll")
then
usedFrameworkLibs.Add(t,packageName.ToString()) |> ignore

kv,installSettings,restrictionList,projectModel)
|> Seq.sortBy (fun (kv,_,_,_) ->
Expand Down

0 comments on commit 0bab2f8

Please sign in to comment.