question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SDK versions already on the VM are installed a second time and pre-installed SDKs become unavailable

See original GitHub issue

Description:

Calling this action with an SDK version pre-installed on the VM causes it to be installed a second time and the pre-installed SDKs become unavailable.

Task version: v2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

Call actions/setup-dotnet with a list of sdks that are pre-installed:

- name: Set up .NET
  uses: actions/setup-dotnet@v2.0.0
  with:
    dotnet-version: |
      3.1.417
      5.0.406
      6.0.201

Expected behavior:

  1. For any SDK version installed by this action to be skipped if it’s already installed on the VM.
  2. All pre-installed SDKs to be available after calling this action.

Actual behavior:

On macos-latest the v3 and v5 SDKs are skipped because they’re already installed while v6 is downloaded and installed. Calling this a second time shows all 3 SDKs being skipped. After calling this action the pre-installed and newly installed SDKs are shown with dotnet --info.

On ubuntu-latest and windows-latest all 3 SDKs are downloaded and installed even though they’re pre-installed. Calling this a second time shows all 3 SDKs being skipped. After calling this action only the newly installed SDKs are shown with dotnet --info, any pre-installed SDK becomes unavailable.

This is being caused by the installation location of the SDKs on Ubuntu and Windows differing from the pre-installed location, while on macOS it’s the same location.

Two test runs can be seen here:

Calling dotnet --info gives the following results (see the above build logs for more info):

macOS out of the box

.NET SDKs installed:
  3.1.101 [/Users/runner/.dotnet/sdk]
  3.1.201 [/Users/runner/.dotnet/sdk]
  3.1.302 [/Users/runner/.dotnet/sdk]
  3.1.417 [/Users/runner/.dotnet/sdk]
  5.0.102 [/Users/runner/.dotnet/sdk]
  5.0.202 [/Users/runner/.dotnet/sdk]
  5.0.302 [/Users/runner/.dotnet/sdk]
  5.0.406 [/Users/runner/.dotnet/sdk]

macOS after calling actions/setup-dotnet

.NET SDKs installed:
  3.1.101 [/Users/runner/.dotnet/sdk]
  3.1.201 [/Users/runner/.dotnet/sdk]
  3.1.302 [/Users/runner/.dotnet/sdk]
  3.1.417 [/Users/runner/.dotnet/sdk] <- skipped
  5.0.102 [/Users/runner/.dotnet/sdk]
  5.0.202 [/Users/runner/.dotnet/sdk]
  5.0.302 [/Users/runner/.dotnet/sdk]
  5.0.406 [/Users/runner/.dotnet/sdk] <- skipped
  6.0.201 [/Users/runner/.dotnet/sdk] <- installed

Windows out of the box (similar for Ubuntu)

.NET SDKs installed:
  3.1.120 [C:\Program Files\dotnet\sdk]
  3.1.202 [C:\Program Files\dotnet\sdk]
  3.1.302 [C:\Program Files\dotnet\sdk]
  3.1.417 [C:\Program Files\dotnet\sdk]
  5.0.104 [C:\Program Files\dotnet\sdk]
  5.0.212 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  5.0.406 [C:\Program Files\dotnet\sdk]
  6.0.201 [C:\Program Files\dotnet\sdk]

Windows after calling actions/setup-dotnet (similar for Ubuntu)

.NET SDKs installed:
  3.1.417 [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk] <- installed
  5.0.406 [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk] <- installed
  6.0.201 [C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk] <- installed

Where’s versions 3.1.120, 3.1.202, 3.1.302, 5.0.104, 5.0.212, 5.0.303?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
vsafonkincommented, Apr 11, 2022

@PureKrome, sure, it was discussed by our team but now it’s not priority feature unfortunately.

2reactions
xt0rtedcommented, Apr 12, 2022

You can see usage in public repos, but that’s it. Action authors can’t see usage stats either unfortunately. My guess is setup-dotnet is used in a lot of private repos making this number not accurate but who knows. I’m sure there’s a fair amount of missed opportunities here with people sticking with Azure DevOps too.

Action Usage
setup-node 710,438
setup-python 444,788
setup-java 260,679
setup-go 189,716
setup-dotnet 86,306
setup-ruby (archived) 27,067
setup-haskell (archived) 2,233
setup-elixir (archived) 2,078
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Azure Windows VM extension failures
Open the Task Manager · Go to the Details tab · Locate the WindowsAzureGuestAgent.exe process · Right-click, and select "End Task". The process ......
Read more >
I can't install intel HAXM - Stack Overflow
Solution was: 1. To un-install Android Studio and install it on D drive including the SDK. This solved the problem.
Read more >
AWS CloudShell compute environment - AWS Documentation
Provides details about the virtual machine and pre-installed tools that support your AWS CloudShell environment.
Read more >
Virtual Machine displays two datastores in Summary tab ...
This article provide steps to resolve the issue where a virtual machine displays two datastores where it should only be one as all...
Read more >
Install Jetson Software with SDK Manager
From the Target Operating System panel, select the operating system and JetPack version. If relevant, select any Additional SDKs that you want ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found