Skip to content

Commit

Permalink
we need to delete stale data.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Aug 27, 2017
1 parent 3520c6c commit cb4cd32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Paket.Core/Installation/RestoreProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ let createProjectReferencesFiles (dependenciesFile:DependenciesFile) (lockFile:L
|> List.map (fun s -> s, (PlatformMatching.forceExtractPlatforms s |> fun p -> p.ToTargetProfile true))
|> List.choose (fun (s, c) -> c |> Option.map (fun d -> s, d))

// delete stale entries (otherwise we might not recognize stale data on a change later)
let objDir = DirectoryInfo(Path.Combine(projectFileInfo.Directory.FullName,"obj"))
objDir.GetFiles(sprintf "%s*.references" projectFileInfo.Name)
|> Seq.iter (fun f -> f.Delete())

// fable 1.0 compat
let oldReferencesFile = FileInfo(Path.Combine(projectFileInfo.Directory.FullName,"obj",projectFileInfo.Name + ".references"))
if oldReferencesFile.Exists then oldReferencesFile.Delete()
Expand Down

0 comments on commit cb4cd32

Please sign in to comment.