-
Notifications
You must be signed in to change notification settings - Fork 700
PATH not parsed properly when using Powershell Core on Mac OS #3402
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
Is the full error message you are getting: "cannot spawn 'dotnet --info'"? This extension doesn't do anything fancy to spawn |
Thanks. I do not believe this is an issue with this extension. You can debug VS Code if you are interested. I believe this is the code you want: https://github.com/microsoft/vscode/blob/ab10e26096a5494b68bc709a405a0dddeb227e0b/src/vs/code/node/shellEnv.ts#L13 |
I am going to close this issue since it isn't really about this extension. 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. |
Issue Description
I have pwsh set as my default shell, and I get the infamous "cannot spawn 'dotnet --info'" when launching VS Code except from the terminal.
Steps to Reproduce
Install VS Code, C# Extension, .NET Core
Install PowerShell Core
Configure PowerShell Core as your default shell (chsh pwsh)
Expected Behavior
VS Code correctly determines location for 'dotnet' and initializes OmniSharp correctly
Actual Behavior
OmniSharp fails to load projects, and VSCode logs 'Cannot spawn 'dotnet --info'
Logs
OmniSharp log
Starting OmniSharp server at 11/12/2019, 3:11:02 PM
Target: /Users/mcumming/github/mcumming/TwystedTea
OmniSharp server started.
Path: /Users/mcumming/.vscode-insiders/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/run
PID: 38405
Starting OmniSharp on MacOS 10.15 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.3 - "/Users/mcumming/.vscode-insiders/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/Users/mcumming/.vscode-insiders/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.3 - "/Users/mcumming/.vscode-insiders/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin"
CscToolExe = csc.exe
MSBuildToolsPath = /Users/mcumming/.vscode-insiders/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin
CscToolPath = /Users/mcumming/.vscode-insiders/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/Roslyn
BypassFrameworkInstallChecks = true
MSBuildExtensionsPath = /Users/mcumming/.vscode-insiders/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/mcumming/github/mcumming/TwystedTea'.
info: OmniSharp.Cake.CakeProjectSystem
Found 1 Cake files.
[warn]: OmniSharp.Cake.CakeProjectSystem
Could not initialize Cake script service. Aborting.
info: OmniSharp.MSBuild.ProjectSystem
No solution files found in '/Users/mcumming/github/mcumming/TwystedTea'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcumming/github/mcumming/TwystedTea/src/TwystedTea/TwystedTea.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcumming/github/mcumming/TwystedTea/src/Samples/Counter/Counter.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/mcumming/github/mcumming/TwystedTea'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcumming/github/mcumming/TwystedTea/src/TwystedTea/TwystedTea.csproj
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/mcumming/github/mcumming/TwystedTea' on host 38389.
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
fail: OmniSharp.MSBuild.ProjectLoader
Encoding 37 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/mcumming/github/mcumming/TwystedTea/src/TwystedTea/TwystedTea.csproj'.
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
/Users/mcumming/github/mcumming/TwystedTea/src/TwystedTea/TwystedTea.csproj
/Users/mcumming/github/mcumming/TwystedTea/packages/gitversiontask/5.0.1/build/GitVersionTask.targets(16,9): Error: Encoding 37 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
Loading project: /Users/mcumming/github/mcumming/TwystedTea/src/Samples/Counter/Counter.csproj
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
fail: OmniSharp.MSBuild.ProjectLoader
Encoding 37 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/mcumming/github/mcumming/TwystedTea/src/Samples/Counter/Counter.csproj'.
/Users/mcumming/github/mcumming/TwystedTea/src/Samples/Counter/Counter.csproj
/Users/mcumming/github/mcumming/TwystedTea/packages/gitversiontask/5.0.1/build/GitVersionTask.targets(16,9): Error: Encoding 37 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
Attempted to update project that is not loaded: /Users/mcumming/github/mcumming/TwystedTea/src/TwystedTea/TwystedTea.csproj
fail: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/mcumming/github/mcumming/TwystedTea/src/Samples/Counter/Counter.csproj
info: OmniSharp.OmniSharpWorkspace
Miscellaneous file: /Users/mcumming/github/mcumming/TwystedTea/src/Samples/Counter/obj/Debug/netcoreapp3.0/AssemblyInfo_Counter_h62qqxte.dyq.g.cs added to workspace
C# log
Environment information
VSCode version: 1.41.0-insider
C# Extension: 1.21.7
Mono Information
OmniSharp using global mono :6.6.0Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.0.100 Commit: 04339c3a26Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.0.100/
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
3.0.100 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: