-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Installed .NET 6.0 SDKs not showing with dotnet --info or dotnet --list-sdks and commands depeding on SDK fail (Linux/Ubuntu) #27129
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
Comments
I've had the same issues as well ever since I updated my .NET SDK to the latest version. I'm on Pop!_OS 22.04 (based on Ubuntu 22.04). |
Hello folks, please check dotnet/core#7699 for more details about this. |
Tried the steps but to no avail.
|
Same here
|
hello folks, after I had updated, the issue appeared to me too. dotnet worked but when I tried to execute with build arg or other few except --verion it showed me the error. what helped me, open link provided by baronfel, and do two steps: 'Use .NET 6 Package via PMC' and 'Scenario 1: Use native Jammy packages after installing a previous .NET release from PMC' |
Same issue here. Ubuntu 22.04.
Edit: I am using the
It was working fine until I updated yesterday. I think I was on 6.0.300 before. |
I updated the document to make it clear when you are intended to use of the "scenarios". |
Thanks, Rich! I followed the instructions in "Mixed state scenario 1" and am back up and running. It's nice to be able to install the SDK without an extra sources entry now. |
For sure. I'm glad the instructions helped.
Indeed. This is the plan going forward. |
Why is there this sudden change of installation steps? |
I'm seeing this too |
I have a fix !
Output of
|
@olfek Great, this fix solved my issue. Thanks! |
@pietervdheijden Did you need to quote the whole post? A reaction would have been enough :P |
My bad... I updated the comment! |
@olfek great! It works for me! Thanx!!! |
Thanks @olfek. This works for me as well. :-) |
How is this not a breaking change? A minor version update shouldn't nuke a previously functioning installation! EDIT: Following the steps here: dotnet/core#7699 will leave you with an outdated SDK and stuck with an old dependency of libunwind which can prevent other software installation / cause dependency conflicts. |
This breaks my dev env on Linux machine. Rider just suddenly not working anymore. Although I fixed it temperarily by #27129 (comment) (Thanks!) It's a very bad issue. |
Fix worked for me on the second attempt. Rider also broke for me. |
I encountered this problem after installing .net7 on ubuntu 22.04. I also needed the .net6 SDK and runtimes which were already installed, but after the .net7 installation, they did not show up.
a couple of uninstall/purge/clean/remove steps yielded the same result; thus, for a quick workaround, I basically moved .net6 related directories from after moving .net6 SDK and runtime folders under
|
There is more detail here: dotnet/core#7699 |
|
Don't use /etc/apt/preferences. sudo nano /etc/apt/preferences.d/dotnet With content:
and sudo nano /etc/apt/preferences.d/aspnet With content:
EDIT: Or more easy with heredoc: sudo sh -c "cat > /etc/apt/preferences.d/dotnet <<'EOF'
Package: dotnet*
Pin: origin packages.microsoft.com
Pin-Priority: 1001
EOF"
sudo sh -c "cat > /etc/apt/preferences.d/aspnet <<'EOF'
Package: aspnet*
Pin: origin packages.microsoft.com
Pin-Priority: 1001
EOF" |
|
@olfek tip of the hat for you sir, it worked 🎩👌 |
Why don't you just fix this? |
It's not straightforward to fix. For folks that don't register the Microsoft feeds, there is no problem. It is the mixing and matching of the Ubuntu and Microsoft feeds that cause issues and require special handling. Documented at https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-ubuntu#whats-going-on |
the best solution for this problem and others that Ubuntu has with versions is to use ASDF which has support for dotnet among others. |
Solution for ubuntu 22.04
AND DONE! "JESUS IS LORD FOREVER!!" |
On Ubuntu, for dotnet-sdk-6.0 and dotnet-sdk-7.0 it is necessary to enforce the preference for the packages comming from Microsoft, to ensure the correct installation Links: dotnet/sdk#27129 (comment) https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution Signed-off-by: Andre Riesco <[email protected]>
On Ubuntu, for dotnet-sdk-6.0 and dotnet-sdk-7.0 it is necessary to enforce the preference for the packages comming from Microsoft, to ensure the correct installation Links: dotnet/sdk#27129 (comment) https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution Signed-off-by: Andre Riesco <[email protected]>
Enforce the preference for the dotnet and aspnet packages comming from the Microsoft source, to ensure the correct installation of this packages Links: dotnet/sdk#27129 (comment) https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-ubuntu#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution Signed-off-by: Andre Riesco <[email protected]>
Is there an existing issue for this?
Describe the bug
[Ubuntu] After upgrade to latest dotnet sdk stopped working. Clean reinstall of latest version doesn't help.
dotnet-sdk-6.0/jammy,now 6.0.400-1 amd64 [installed]
dotnet --info output:
dotnet tools list
Expected Behavior
dotnet SDK expected to be working after install or upgrade
Steps To Reproduce
Installed according to instruction for the ubuntu 22.04: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2204
Exceptions (if any)
No response
.NET Version
The command could not be loaded, possibly because: * You intended to execute a .NET application: The application '--version' does not exist. * You intended to execute a .NET SDK command: No .NET SDKs were found. Download a .NET SDK: https://aka.ms/dotnet-download Learn about SDK resolution: https://aka.ms/dotnet/sdk-not-found
Anything else?
dotnet-sdk-6.0/jammy,now 6.0.400-1 amd64 [installed]
The text was updated successfully, but these errors were encountered: