-
Notifications
You must be signed in to change notification settings - Fork 1.8k
C#: Download latest dotnet SDK when missing #15692
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
Conversation
csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs
Outdated
Show resolved
Hide resolved
csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs
Outdated
Show resolved
Hide resolved
|
||
if (ensureDotNetAvailable) | ||
{ | ||
return DownloadDotNetVersion(builder, installDir, Constants.LatestDotNetSdkVersion, needExactVersion: false); |
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 can't we simply skip the --version
argument to the install script? That should install the latest version.
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.
I haven't tried that, but I think it wouldn't work. You can pass latest
to -Version
, but you need to also specify the -Channel
. Also, I think it's somewhat safer to control the exact fallback version, and then the version that we use seems to be a good candidate.
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.
LGTM!
This PR extends the dotnet SDK downloading in buildless mode. If there's no
dotnet
CLI on the machine, it downloads the latest one as if that version was specified in theglobal.json
. This way buildless extraction doesn't depend ondotnet
being installed beforehand onto the machine.