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

dotnet.dotnetPath should support workspace relative paths #6471

Closed
dibarbet opened this issue Oct 2, 2023 · 4 comments
Closed

dotnet.dotnetPath should support workspace relative paths #6471

dibarbet opened this issue Oct 2, 2023 · 4 comments

Comments

@dibarbet
Copy link
Member

dibarbet commented Oct 2, 2023

Copied from microsoft/vscode-dotnettools#53

Describe the Issue

My repo provisions a repo-local installation of the .NET SDK. As such, my workspace settings previously had "omnisharp.dotnetPath": "../.dotnet", which worked.

After upgrading to the prerelease version of the C# extension (v2.0.206), I adjusted this setting to "dotnet.dotnetPath": "../.dotnet".

The language server now fails to start and my C# console output shows:

[Error - 11:20:17 AM] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Error: Cannot find dotnet path '../.dotnet/dotnet'

Steps To Reproduce

No response

Expected Behavior

No response

Environment Information

No response

@dibarbet
Copy link
Member Author

Adjusting to backlog for now. We can definitely add support for relative paths to dotnet.dotnetPath - but it won't be super useful by itself. Neither the CLI, nor project loading (in either devkit or c#) will use this path. That generally requires SDK support as described in microsoft/vscode-dotnettools#63 (comment)

Related - dotnet/sdk#8254

@geekley
Copy link

geekley commented Dec 11, 2023

Yes, please. It should either support variable substitution like ${workspaceFolder} and ${userHome} and/or at least be resolved relative to workspace, so that we can have this setting locally per-repository through e.g. git-ignored symlinks (since VSCode still doesn't support local workspace settings, it can't be an absolute path because you can't guarantee this workspace setting can be git-ignored).

@dibarbet
Copy link
Member Author

dotnet.dotnetPath is being removed, and will be replaced by dotnetAcquisitionExtension.existingDotnetPath (managed by https://github.com/dotnet/vscode-dotnet-runtime) if using the Roslyn version, or omnisharp.dotnetPath if using O#.

#7825

@dibarbet dibarbet closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2024
@geekley
Copy link

geekley commented Nov 28, 2024

dotnet.dotnetPath is being removed, and will be replaced by dotnetAcquisitionExtension.existingDotnetPath (managed by https://github.com/dotnet/vscode-dotnet-runtime) if using the Roslyn version, or omnisharp.dotnetPath if using O#.

#7825

@dibarbet Do both alternatives support relative paths?

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

2 participants