Skip to content
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

Failed to install on a fresh installation of Fedora 37 with .NET 7 #1112

Closed
CicadaCinema opened this issue Feb 14, 2023 · 3 comments
Closed

Comments

@CicadaCinema
Copy link
Contributor

I installed the .NET SDK by running sudo dnf install dotnet-sdk-7.0 .

Version information:

[jazz@dracula ~]$ dotnet --list-sdks
7.0.102 [/usr/lib64/dotnet/sdk]
[jazz@dracula ~]$ dotnet --list-runtimes
Microsoft.AspNetCore.App 7.0.2 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.2 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

I followed the installation instructions and modified my PATH as required:

[jazz@dracula ~]$ dotnet tool install -g git-credential-manager

Welcome to .NET 7.0!
---------------------
SDK Version: 7.0.102

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Tools directory '/home/jazz/.dotnet/tools' is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:

cat << \EOF >> ~/.bash_profile
# Add .NET Core SDK tools
export PATH="$PATH:/home/jazz/.dotnet/tools"
EOF

You can add it to the current session by running the following command:

export PATH="$PATH:/home/jazz/.dotnet/tools"

You can invoke the tool using the following command: git-credential-manager
Tool 'git-credential-manager' (version '2.0.886') was successfully installed.
[jazz@dracula ~]$ echo $PATH
/home/jazz/.local/bin:/home/jazz/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jazz/Software/flutter/bin:/home/jazz/Software/flutter/bin
[jazz@dracula ~]$ cat << \EOF >> ~/.bash_profile
# Add .NET Core SDK tools
export PATH="$PATH:/home/jazz/.dotnet/tools"
EOF

(in a new terminal):

[jazz@dracula ~]$ git-credential-manager configure
You must install or update .NET to run this application.

App: /home/jazz/.dotnet/tools/git-credential-manager
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.11' (x64)
.NET location: /usr/lib64/dotnet

The following frameworks were found:
  7.0.2 at [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.11&arch=x64&rid=fedora.37-x64

I thought this might be related to #1011 but apparently not:

[jazz@dracula ~]$ echo $DOTNET_ROOT
/usr/lib64/dotnet
[jazz@dracula ~]$ stat /usr/lib/dotnet
stat: cannot statx '/usr/lib/dotnet': No such file or directory
[jazz@dracula ~]$ stat /usr/lib64/dotnet
  File: /usr/lib64/dotnet
  Size: 172             Blocks: 0          IO Block: 4096   directory
Device: 0,33    Inode: 451487      Links: 1
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:lib_t:s0
Access: 2023-01-13 23:33:24.000000000 +0000
Modify: 2023-02-14 18:19:28.302348749 +0000
Change: 2023-02-14 18:19:28.302348749 +0000
 Birth: 2023-02-14 18:19:26.825319858 +0000
@CicadaCinema
Copy link
Contributor Author

Removing dotnet-sdk-7.0 and installing dotnet-sdk-6.0 succeeds, as expected:

[jazz@dracula ~]$ sudo dnf install dotnet-sdk-6.0

... snip ...

[jazz@dracula ~]$ dotnet tool install -g git-credential-manager

Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.113

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
You can invoke the tool using the following command: git-credential-manager
Tool 'git-credential-manager' (version '2.0.886') was successfully installed.
[jazz@dracula ~]$ git-credential-manager configure
Configuring component 'Git Credential Manager'...
Configuring component 'Azure Repos provider'...
[jazz@dracula ~]$ git-credential-manager --help
git-credential-manager

Usage:
  git-credential-manager [options] [command]

Options:
  --version       Show version information
  -?, -h, --help  Show help and usage information

Commands:
  get          [Git] Return a stored credential
  store        [Git] Store a credential
  erase        [Git] Erase a stored credential
  configure    Configure Git Credential Manager as the Git credential helper
  unconfigure  Unconfigure Git Credential Manager as the Git credential helper
  diagnose     Run diagnostics and gather logs to diagnose problems with Git Credential Manager
  azure-repos  Commands for interacting with the Azure Repos host provider

@CicadaCinema
Copy link
Contributor Author

I'm not sure whether .NET 7 is not supported or whether this is a bug - either way this requires looking into, I think.

@ldennington
Copy link
Contributor

Unfortunately .NET tools require the version of the .NET SDK corresponding to the framework version of the project(s) for which they're published. GCM (for macOS and Linux at least) is currently on .NET 6.0, which means users who want to install the tool will need to have the latest version of the .NET 6.0 SDK installed. I've updated the install instructions to reflect this - thank you for pointing it out @CicadaCinema!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants