Skip to content

VsCode extension fails install on OSX #3147

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

Closed
emarks opened this issue Jun 30, 2019 · 7 comments
Closed

VsCode extension fails install on OSX #3147

emarks opened this issue Jun 30, 2019 · 7 comments
Assignees

Comments

@emarks
Copy link

emarks commented Jun 30, 2019

Issue Description

When installing VsCode extension it reports "Failed to spawn 'dotnet --info'"; but, only for one specific user. If I create a new user, create a dotnet console program, open application with vscode, follow the prompts to install extensions, then everything worked as expected.

Steps to Reproduce

Install the extension for a specific user.

Expected Behavior

Extension installs

Actual Behavior

Extension installation reports that it cannot spare dotnet --info

Logs

OmniSharp log

Installing C# dependencies...
Platform: darwin, x86_64

Downloading package 'OmniSharp for OSX' (43667 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for OSX'

Downloading package '.NET Core Debugger (macOS / x64)' (51526 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (macOS / x64)'

Downloading package 'Razor Language Server (macOS / x64)' (57271 KB).................... Done!
Installing package 'Razor Language Server (macOS / x64)'

Finished

Failed to spawn 'dotnet --info'

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.35.1
C# Extension: 1.20.0
OSX: 10.13.6
NodeJs: 8.11.1
dotnet:
.NET Core SDK (reflecting any global.json):
Version: 2.2.300
Commit: 73efd5bd87

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.13-x64
Base Path: /usr/local/share/dotnet/sdk/2.2.300/

Host (useful for support):
Version: 2.2.5
Commit: 0a3c9209c0

.NET Core SDKs installed:
2.2.107 [/usr/local/share/dotnet/sdk]
2.2.300 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Mono Information OmniSharp using built-in mono
Dotnet Information A valid dotnet installation could not be found.
Visual Studio Code Extensions
Extension Author Version
csharp ms-vscode 1.20.0
HTMLHint mkaufman 0.6.0
vscode-eslint dbaeumer 1.9.0

Note that I have uninstalled all other extensions and had the same result for this user.
Running dotnet run from the Terminal window in VsCode works as expected.

@akshita31
Copy link
Contributor

@emarks It appears that you dont have dotnet on your path. Could you reinstall dotnet and check that your path variable has dotnet on it.

@emarks
Copy link
Author

emarks commented Jul 1, 2019

@akshita31 Thanks for getting back to me.

Yes, I checked that and it is in the path. In fact, dotnet --info from within the vscode terminal works fine. I found that if I go into the directory with .csproj and run "code ." that it works all the time. The install seems to be failing on line 85 of src/coreclr-debug/util.ts, resulting in "Failed to spawn 'dotnet --info". It's the spawn that is failing, not that it doesn't find dotnet. I haven't had time to investigate it further.

@akshita31
Copy link
Contributor

@emarks Thank you for confirming that. We have a similar issue here #2728. Did you recently install .NET? Can you restart your system and check again ?

@emarks
Copy link
Author

emarks commented Jul 5, 2019

Yes, I installed dotnet for the first time on this laptop within the last week. I installed the C# extension immediately after validating that dotnet worked from the command line.

Restart made no difference.

Note that this is only happening with one user account on the laptop. A second one worked fine. I added a third just to test and it worked fine. The effected user had already been using vscode for some time for C/C++ and NodeJS development. I did uninstall all the extensions in that users vscode and installed only the C# extension and the problem persisted.

@rchande
Copy link

rchande commented Jul 29, 2019

@emarks Did you figure this out? It sounds like the account that had problems might not have had dotnet on its PATH?

@emarks
Copy link
Author

emarks commented Jul 30, 2019

@emarks Did you figure this out? It sounds like the account that had problems might not have had dotnet on its PATH?

No, I was not able to get it to work with that account. dotnet was in the PATH all along and worked fine from the command line and from the vscode terminal view. However, the extension could never find it.

@gregg-miskelly
Copy link
Contributor

I am going to close this issue since it isn't really about this extension, and this issue is rather old. Note that I am adding a help link to the error message with #3507, to hopefully make it easier to understand what is going on.

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

4 participants