Skip to content

Conversation

@KevinRansom
Copy link
Contributor

The original algorithm for mapping NETSdk pack locations from the implementation directoy was incorrect.

We now compute the NETSdk reference assembly to be the highest version that is lower or equal to the implementation version.

@KevinRansom KevinRansom requested a review from brettfo November 30, 2020 03:59
if Directory.Exists(microsoftNETCoreAppRef) then
Some version, Some microsoftNETCoreAppRef
let directory = DirectoryInfo(microsoftNETCoreAppRef).GetDirectories()
|> Array.sortBy (fun di -> di.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should really be a semver comparison, but that gets nasty so I suppose this is good enough.

Could you check this, though, with a purposely badly named runtime dir name? I commonly pretend to remove, e.g., the 3.1.2 dir by renaming it to brettfo_3.1.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes numbers are better than string comparisons. I will change it.

@KevinRansom KevinRansom merged commit cd0d9f2 into dotnet:main Dec 1, 2020
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* Fix net sdk references discovery

* Do numbers properly

* version filter
@KevinRansom KevinRansom deleted the fixsdk branch January 21, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants