-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update logic of resolving SdkReferenceAssemblies. #2639
Conversation
dotnetRoot.Directory.FullName | ||
</> "packs" | ||
</> "Microsoft.NETCore.App.Ref" | ||
</> this.ResolveSdkRuntimeVersion() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not something I want to tackle in this PR but this.ResolveSdkRuntimeVersion()
is just going to throw if no global.json
is present. This feels wrong, could the version not be extracted from running dotnet --version
instead if no global.json is present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree here, we can't assume the presence of global.json. the safest path is to invoke the dotnet
found from the new code you added and call --version
. Proj-Info also does this here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doesn't dotnet --version
work for all cases? Why care if global.json exists or not?
Oh, and I tested this on my local project and it worked on my machine 😊. |
Failing tests feel unrelated,
|
@nojaf Thanks for the PR, the template integration tests started to fail not sure why! Thanks |
Tests should be fixed in this PR. |
Thanks @yazeedobaid, I'll rebase when #2640 got merged in. |
@nojaf Yeah sure, if all goes well then we can release this as a hotfix. |
Should we also use this algorithm in FAKE/src/app/Fake.DotNet.Cli/DotNet.fs Lines 81 to 97 in c7273c7
|
@yazeedobaid yes, but with one modification - the current algorithm supports checking the user-local install directories if as a last-resort, but the code from proj-info doesn't. I think that behavior should be kept for probing purposes, and TBH it should be added to proj-info as well. e.g. adding an |
Guessing this is related, although not entirely the same as the original issue mentioned on the PR: #2641 |
@yazeedobaid rebased. |
Description