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

Add help link to .NET SDK install prompt #3508

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

gregg-miskelly
Copy link
Contributor

@gregg-miskelly gregg-miskelly commented Jan 14, 2020

This adds a Help link to the .NET SDK install prompt to help users troubleshoot problems with locating dotnet.

The help page to review: https://github.com/OmniSharp/omnisharp-vscode/wiki/Troubleshooting:-'The-.NET-Core-SDK-cannot-be-located.'-errors

This fixes #3507

This adds a Help link to the .NET SDK install prompt to help users troubleshoot problems with locating `dotnet`.
@gregg-miskelly gregg-miskelly changed the title Add Help link to .NET SDK install prompt Add help link to .NET SDK install prompt Jan 14, 2020
@WardenGnaw
Copy link
Contributor

Found the restart button but it still is failing with:

Failed to fetch https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/main/binary-amd64/Packages Writing more data than expected (622228 > 606754)

Must be a cache error and might just need to wait a bit.

@gregg-miskelly
Copy link
Contributor Author

The CI failure is from: dotnet/core#4122

@gregg-miskelly
Copy link
Contributor Author

@WardenGnaw can you hit the restart button? The apt get issue is supposed to be fixed now.

@JoeRobich
Copy link
Member

I hit the restart button for you.

@gregg-miskelly
Copy link
Contributor Author

@JoeRobich Thanks. Can you poke it again (or just force it through) one flaky test...

@codecov
Copy link

codecov bot commented Jan 15, 2020

Codecov Report

Merging #3508 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3508   +/-   ##
======================================
  Coverage    89.8%   89.8%           
======================================
  Files          59      59           
  Lines        1589    1589           
  Branches       89      89           
======================================
  Hits         1427    1427           
  Misses        151     151           
  Partials       11      11
Flag Coverage Δ
#integration 100% <ø> (ø) ⬆️
#unit 89.8% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4e631a...46c7bcf. Read the comment docs.

@gregg-miskelly gregg-miskelly merged commit 5c4d5c7 into dotnet:master Jan 15, 2020
@gregg-miskelly gregg-miskelly deleted the DotnetSDkHelp branch January 15, 2020 00:47
@Gerhard-Piette
Copy link

Gerhard-Piette commented Sep 18, 2020

DO NOT USE Ubuntu.
Not even the Binary file from https://dotnet.microsoft.com/download/dotnet/5.0 works because the dotnet executable is not recognized on Ubuntu. I guess it is related to dotnet-sdk on snap on Ubuntu.

I have no problems using the .net5 RC1 on Fedora 33 beta.

Download the dotnet-sdk SDK manually.
I have downloaded the Binaries from https://dotnet.microsoft.com/download/dotnet/5.0
No package manager.

Start VSCode with a script file with this content:
export PATH=$PATH:/YYY/
/home/XXX/Downloads/VSCode/code-insiders

where you have to adapt XXX and YYY to your case.
YYY is the folder where you have stored the SDK.

DO NOT USE Ubuntu snap.
Someone working on snap dotnet-sdk must have introduced an automatic "dotnet" alias that is listed but can not be removed with the "sudo snap unalias dotnet" command because Error: "cannot find manual alias "dotnet" in any snap".
Unfortunately the people working on omnisharp do not care about this problem.

From my console:

xxx:~$ dotnet

Usage: dotnet [options]
Usage: dotnet [path-to-application]

Options:
-h|--help Display help.
--info Display .NET information.
--list-sdks Display the installed SDKs.
--list-runtimes Display the installed runtimes.

path-to-application:
The path to an application .dll file to execute.
xxx:$ snap aliases
Befehl Alias Anmerkungen
dotnet-sdk.dotnet dotnet -
xxx:
$ sudo snap unalias dotnet
Fehler: cannot find manual alias "dotnet" in any snap

Previously:

I made this post already here and here.

On Ubuntu 20.04.1, the problem is the snap alias. Do not install it.

Instead do this:

sudo snap install dotnet-sdk --channel=5.0/beta --classic

DO NOT install the alias because it makes Omnisharp not find the SDK.
sudo snap alias dotnet-sdk.dotnet dotnet

It can be removed with:
sudo snap unalias dotnet

Start VSCode with a script file with this content:
export PATH=$PATH:/snap/dotnet-sdk/current/
/home/XXX/Downloads/VSCode/code-insiders

You have to adapt the second line, that starts VSCode insiders, to your case.

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

Successfully merging this pull request may close these issues.

Provide better error when dotnet cannot be located
4 participants