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

Can't point OmniSharp at an alternate .NET CLI installation #948

Closed
DustinCampbell opened this issue Aug 22, 2017 · 3 comments
Closed

Can't point OmniSharp at an alternate .NET CLI installation #948

DustinCampbell opened this issue Aug 22, 2017 · 3 comments

Comments

@DustinCampbell
Copy link
Contributor

From @wjk on August 22, 2017 15:49

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   E:\Applications\dotnet-sdk\sdk\2.0.0\


Microsoft .NET Core Shared Framework Host
  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

VS Code version: 1.15.1
C# Extension version: 1.12.1

Steps to reproduce

I am running VSCode on a system that I do not have admin rights to. Therefore, I cannot run the .NET CLI installer, as that requires that I elevate. (I have installed VSCode using VSCodePortable, if you're wondering.) I have downloaded a zipped copy of .NET CLI and extracted it into a local folder, but OmniSharp insists on searching the system PATH, and only the system PATH, for dotnet.exe. As it can't find a copy there, OmniSharp simply fails to start. There is no configuration setting I can find to override this and have OmniSharp use an arbitrary copy of .NET CLI.

Expected behavior

I should be able to do this.

Actual behavior

I can't.

Copied from original issue: dotnet/vscode-csharp#1729

@DustinCampbell
Copy link
Contributor Author

It seems like we need a configuration option to set the location of dotnet.exe. We already have most of the logic in place. Anyone should be able to pick this up.

@haltcase
Copy link

haltcase commented Oct 1, 2019

@wjk et al. I use this setup already - I use VS Code Portable (there's an official version of this now though) with the dotnet SDK binaries in a non-standard location. I added the dotnet binary location to my Path environment variable and then created the DOTNET_ROOT env var with that same directory. Has worked for me since some of the earlier previews and through the GA release of .NET Core.

Ref (bottom of this section, look for DOTNET_ROOT):

https://github.com/dotnet/docs/blob/801fe29c48a5bce082edcaf5b9ac53a1fe7b6447/docs/core/tools/troubleshoot-usage-issues.md#runtime-not-found

@filipw
Copy link
Member

filipw commented Dec 4, 2021

This was implemented in #2227

@filipw filipw closed this as completed Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants