Skip to content

Install scripts don't attempt to install when the runtime specific binaries are present but not the dotnet executable #552

Description

@JanProvaznik

dotnet/vscode-dotnet-runtime#2059 (comment)

Install scripts could check that dotnet.exe / dotnet is present in the directory before deciding whether to install or report that it's already installed.

ls idir
LICENSE.txt  ThirdPartyNotices.txt  dotnet  host  shared
./dotnet-install.sh --install-dir idir/ --runtime aspnetcore
dotnet-install: ASP.NET Core Runtime with version '8.0.11' is already installed.

rm idir/dotnet
./dotnet-install.sh --install-dir idir/ --runtime aspnetcore
dotnet-install: ASP.NET Core Runtime with version '8.0.11' is already installed.

This change would enable a recovery from a corrupted install by using the same command again.

Activity

  1. added
    untriaged
    devkit-related
    and removed
    untriaged
    on Dec 4, 2024
  2. JanProvaznik commented on Dec 9, 2024

    @JanProvaznik
    MemberAuthor

    Internal discussion:
    Devkit can work around this faster if they need it (and install-scripts can't deploy this month if it's not critical).

    There is no silver bullet for figuring out if the environment is set up correctly after the install scripts run and if a reinstall would help. But checking that the dotnet.exe/dotnet exists is a good idea with low priority.

  3. added
    untriaged
    and removed
    untriaged
    on Jun 11, 2025
  4. added
    up-for-grabs
    and removed on Jun 11, 2025
  5. ellahathaway commented on May 11, 2026

    @ellahathaway
    Member

    Adding a bit more detail from #694, since I think it describes the same underlying problem:

    The install scripts’ “already installed” check appears to only verify that the version directory exists. But the .NET host uses a stricter check: for SDKs it expects dotnet.dll, and for shared frameworks it expects .deps.json inside the version directory.

    That means a partially corrupted install can get stuck in an un-healable state:

    • the install script sees the directory and says “already installed”
    • the host ignores that version because the required marker file is missing
    • rerunning the install script still does not repair it
    • manual deletion of the version directory is required to force reinstall

    This can happen after interrupted extraction, partial cleanup, disk-full conditions, or failed concurrent installs.

    The install scripts should align their check with the host-visible artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    devkit-relatedup-for-grabs

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions