Skip to content

With .Net 6 Preview7, failed to open '/etc/dotnet/install_location' when running dotnet tool #56219

Closed

Description

@WenJunJi01

Repro steps:

  1. Install .NET 6 Preview7 SDK(6.0.100-preview.7.21369.19)
  2. Run below commands:
    dotnet tool install -g doTNetsay
    dotnet tool list -g
    dotnetsay

Expected Result:
Tool dotnetsay can be run successfully

Actual Result:
Failed to open '/etc/dotnet/install_location' when running dotnet tool:
The install_location file ['/etc/dotnet/install_location'] failed to open: No such file or directory.

image

Note: Not repro Windows10

Dotnet info:
.NET SDK (reflecting any global.json):
Version: 6.0.100-preview.7.21369.19
Commit: cdbd475cb6

Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /usr/share/dotnet/sdk/6.0.100-preview.7.21369.19/

Host (useful for support):
Version: 6.0.0-preview.7.21368.2
Commit: 8d3afa3

.NET SDKs installed:
6.0.100-preview.7.21369.19 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0-preview.7.21369.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-preview.7.21368.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

Activity

  1. wli3 commented on Jul 22, 2021

    @wli3

    @mikem8361 could you look into this install_location issue?

  2. assigned and unassigned on Jul 22, 2021
  3. wli3 commented on Jul 22, 2021

    @wli3
  4. mikem8361 commented on Jul 22, 2021

    @mikem8361
    Contributor

    Why did I get assigned this issue?

  5. transferred this issue fromdotnet/sdkon Jul 23, 2021
  6. ghost added
    untriaged
    on Jul 23, 2021
  7. 1 remaining item

  8. removed
    untriaged
    on Jul 23, 2021
  9. vitek-karas commented on Jul 23, 2021

    @vitek-karas
    Member

    I'm gonna give this a shot of fixing (to refresh my linux debugging non-skills).

  10. agocke commented on Jul 26, 2021

    @agocke
    Member

    Looks like that error should not be printed, but it is not causing any other side effects (the process is not exiting) so I don't think this is blocking

  11. vitek-karas commented on Jul 26, 2021

    @vitek-karas
    Member

    It is blocking - we can't alter an output (stderr or stdout) of a console app if it works - the entire functionality of the app might be to print something to stderr and if something else tries to parse it it would be broken.

  12. mateoatr commented on Jul 26, 2021

    @mateoatr
    Contributor

    We must change this to info:

    if (install_location_file == nullptr)
    {
    trace::error(_X("The install_location file ['%s'] failed to open: %s."), install_location_file_path.c_str(), pal::strerror(errno));
    return false;
    }

  13. agocke commented on Jul 26, 2021

    @agocke
    Member

    This is blocking Preview 7?

  14. vitek-karas commented on Jul 26, 2021

    @vitek-karas
    Member

    Blocking Preview 7 - don't know - it might. It's pretty bad and there's really no work around (creating the file is one, but one needs to know what to put into it).

  15. ghost added
    in-pr
    on Jul 26, 2021
  16. added a commit that references this issue on Jul 27, 2021
    5397d30
  17. ghost removed
    in-pr
    on Jul 27, 2021
  18. ghost locked as resolved and limited conversation to collaborators on Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions