-
Notifications
You must be signed in to change notification settings - Fork 272
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
dotnetAcquisitionExtension.sharedExistingDotnetPath should be environment specific #1952
Comments
This might actually get fixed in the latest version we plan to release this week. We are going to check whether the PATH works or not before using it, so I'd imagine this would be fixed via that. |
@nagilson I am a bit unsure how checking if the path works are going to fix this? And what happens if it doesn't work, what's the fallback? Not knowing exactly what you mean, my worries is that if there is only one path configuration for both Windows and WSL based Code environments, it will be an issue if you need to have custom paths in both? 🤔 But, let's see if that fix you fixes this as well! |
It will cause it not to fail, because it will not use the setting, and instead it will download a runtime, which should succeed. Adding @baronfel for a PM opinion on having an option for 2 custom paths per environment. |
@nagilson Ok, as long as it downloads if it fails, it's ok for my scenario since it is in Windows/PowersShell we have restrictions, WSL is not protected by any such rules, so we can set custom path in Windows and then let default logic happen in WSL... However since Microsoft has added (or are about to at least) AppLocker support for WSL that may change... As for your other question, I'm not quite sure what you are saying here.. But yes, if we have a workspace based settings file with the path it maybe work, but then you will need to have this in multiple locations if you have multiple projects/workspaces... I'm not sure if that is a good workaround, but it is probably a workaround. |
The new version is out, let us know if it was helpful or not. Youre right that the powershell restriction is in place but -- I dont believe our extension logic would ever call into powershell on linux so that shouldnt be a problem on WSL. |
Sorry for delayed answer, but I tested it today, but still get the issue in VS Code...
The .NET install tool output just states Here is my config:
Version information:
|
@nagilson Sorry, ignore the comment above. I realized the minute I pressed comment that I had forgotten to reload the VS code after extension update. Now I got a warning instead when I started stating
According to the output of .NET install tool it seems to work correct... It is however annoying that the warning comes all the time 😕 |
Yeah, I had made a checkbox to get rid of the warning but I merged it into the option to ignore the setting which was actually a poor idea. At the very least we could add that! |
Describe the bug.
Due to the environment I'm running Visual Studio Code has PowerShell restricted to be executed in
Constrained Language Mode
the .NET Install Tool fails to install a VS Code only .NET environment, and a suggestion (with auto fix functionality) is to set thedotnetAcquisitionExtension.sharedExistingDotnetPath
setting to a custom dotnet path (which in my case will be"C:\\Program Files\\dotnet\\dotnet.exe"
which works fine in Windows.However, this settings will also affect some extension in WSL that uses this path to get the path to the dotnet executable in WSL, causing those extensions to fail (e.g. the Bicep extension which I have reported this as well in Azure/bicep#15098).
This path (and maybe other paths) should be possible to have different in Windows/WSL environments.
Please attach log file(s) here if you have any.
No log file on this.
Reproduction Steps
Repro steps:
Failed to find dotnet executable at path '/mnt/c/Users/USER/AppData/Local/Programs/Microsoft VS Code/C:\Program Files\dotnet\dotnet.exe'.
is displayed.Expected Behavior
Environment specific settings done in Windows should not affect WSL (and the other way around).
Exceptions & Errors (if any)
No response
.NET Install Tool Version
2.1.5
Your operating system? Please provide more detail, such as the version and or distro above.
Windows
VS Code Version
1.93.1
The text was updated successfully, but these errors were encountered: