Skip to content

Commit

Permalink
Do not reference NETStandard.Library directly - fixes #2852
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 18, 2017
1 parent c3e5256 commit 25643f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
19 changes: 4 additions & 15 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
#### 5.114.8 - 2017-10-18
* COSMETICS: Don't trace so much noise in dotnet restore

#### 5.114.7 - 2017-10-18
#### 5.115.0 - 2017-10-18
* PERFORMANCE: Fix performance problem introduced in 5.101.0 - https://github.com/fsprojects/Paket/pull/2850
* BUGFIX: Minor perf improvement for why command - https://github.com/fsprojects/Paket/pull/2851

#### 5.114.6 - 2017-10-18
* BUGFIX: Make json cache file reading more robust - https://github.com/fsprojects/Paket/issues/2838

#### 5.114.5 - 2017-10-14
* PERFORMANCE: Fix performance problem introduced in 5.101.0 - https://github.com/fsprojects/Paket/pull/2850

#### 5.114.4 - 2017-10-13
* BUGFIX: Do not restore sdk projects when a group is given - https://github.com/fsprojects/Paket/issues/2838

#### 5.114.3 - 2017-10-13
* BUGFIX: Use maps instead of lists in why command - https://github.com/fsprojects/Paket/pull/2845

#### 5.114.2 - 2017-10-13
* BUGFIX: isExtracted function was falsely returning true to comparison - https://github.com/fsprojects/Paket/pull/2842
* USABILITY: Do not reference NETStandard.Library directly - https://github.com/fsprojects/Paket/issues/2852
* COSMETICS: Don't trace so much noise in dotnet restore

#### 5.114.0 - 2017-10-11
* BUGFIX: Invalidate internal NuGet caches
Expand Down
17 changes: 11 additions & 6 deletions src/Paket.Core/Installation/RestoreProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ let createAlternativeNuGetConfig (projectFile:FileInfo) =
</disabledPackageSources>
</configuration>"""
if not alternativeConfigFileInfo.Exists || File.ReadAllText(alternativeConfigFileInfo.FullName) <> config then
File.WriteAllText(alternativeConfigFileInfo.FullName,config)
File.WriteAllText(alternativeConfigFileInfo.FullName,config)
if verbose then
tracefn " - %s created" alternativeConfigFileInfo.FullName

let createPaketPropsFile (cliTools:ResolvedPackage seq) restoreSuccess (fileInfo:FileInfo) =
let cliParts =
Expand Down Expand Up @@ -268,6 +270,8 @@ let createPaketCLIToolsFile (cliTools:ResolvedPackage seq) (fileInfo:FileInfo) =
if verbose then
tracefn " - %s already up-to-date" fileInfo.FullName

let ImplicitPackages = [PackageName "NETStandard.Library"] |> Set.ofList

let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (referencesFile:ReferencesFile) (resolved:Lazy<Map<GroupName*PackageName,PackageInfo>>) (groups:Map<GroupName,LockFileGroup>) =
let projectFileInfo = FileInfo projectFile.FileName
let hulls =
Expand All @@ -289,7 +293,7 @@ let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (
// -> We reached an invalid state
let objDir = DirectoryInfo(Path.Combine(projectFileInfo.Directory.FullName,"obj"))
for f in objDir.GetFiles(sprintf "%s*.paket.resolved" projectFileInfo.Name) do
f.Delete()
try f.Delete() with | _ -> ()

This comment has been minimized.

Copy link
@matthid

matthid Oct 19, 2017

Member

oO Should we add a warning or something like that? Was there an issue about this?

This comment has been minimized.

Copy link
@forki

forki Oct 19, 2017

Author Member

This comment has been minimized.

Copy link
@matthid

matthid Oct 19, 2017

Member

I meant this particular line change


// fable 1.0 compat
let oldReferencesFile = FileInfo(Path.Combine(projectFileInfo.Directory.FullName,"obj",projectFileInfo.Name + ".references"))
Expand All @@ -308,10 +312,11 @@ let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (
let restore =
let resolvedPackage = resolved.Force().[key]

match resolvedPackage.Settings.FrameworkRestrictions with
| Requirements.ExplicitRestriction restrictions ->
Requirements.isTargetMatchingRestrictions(restrictions, targetProfile)
| _ -> true
not (ImplicitPackages.Contains resolvedPackage.Name) &&
match resolvedPackage.Settings.FrameworkRestrictions with
| Requirements.ExplicitRestriction restrictions ->
Requirements.isTargetMatchingRestrictions(restrictions, targetProfile)
| _ -> true

if restore then
let _,packageName = key
Expand Down

0 comments on commit 25643f1

Please sign in to comment.