Closed jfversluis closed 10 months ago
Hello! Thank you for your question. This looks like a bug. I've noticed that this behavior occurs only if you use PowerShell instead of the cmd. As a workaround, you can switch your VSCode terminal to the cmd.
Ah perfect, I was wondering if that had anything to do with it. Confirmed that fixes it for now, thanks!
Hi! This looks like a VSCode bug. I created the issue for this bug: https://github.com/microsoft/vscode/issues/173719
Hi Nikita, I just ran into the same error. May I suggest using single quotes (') instead of double quotes (") to wrap the cmdline arguments in? I think that usually works better with powershell. I'd rather we didn't have to fall back to cmd in 2023 ;). I'm currently trying to do this myself and build a version of the extension to test it, but I'm unable to build anyway, without spending another weekend figuring out how Cake works (I always dread when I see tools like Cake/Fake/Paket because I immediately know I won't be able to build easily).
The line I think needs changing:
from:
builder.append(-p:AndroidSdkDirectory="${ConfigurationController.androidSdkDirectory}"
);
to:
builder.append(-p:AndroidSdkDirectory='${ConfigurationController.androidSdkDirectory}'
);
and the method in this line could do with the same change tbh: .appendQuoted(ConfigurationController.project!.path)
Hi, @OutOfScopeia! It would be a nice solution, but a lot of users are already using cmd
. It will be a breaking change for them. I hope the VSCode team will fix this problem.
As a workaround, you can always open the folder with the extension code (C:\Users\YOU\.vscode\extensions\nromanov.dotnet-meteor-X.X.X\extension
) and modify the extension.js
file.
Don't forget to save the file and restart VSCode.
I have already managed to build my own version with single-qoutes. I just needed to install vcse and webpack. And remove the 'net8.0' target from whatever project. But it's nice that an edit to an already deployed extension can fix it, too! I'll definitely be doing that from now on.
Hi, Guys!
When I was working on .NET Meteor 4.0, I found that there is a vscode.env.shell
property in the VSCode. If we are on Windows and using powershell
, then it will be a string C:\Windows\...\powershell.exe
. I wrote a magic code that fixes the path to the Android Sdk.
Try the new version 3.4.1
. Maybe someday Microsoft will fix this problem, but it's bad fix better than nothing =)
When using the extension on Windows, trying to run on Android, I run into the following error:
It seems that it's thrown off by the
(x86)
in the path of the Android SDK directory, but it seems to be in quotes, so not sure why that happens. On the other hand, running that exact same command manually does seem to work, so maybe it isn't about thex86
in the path?This is on a File > New .NET MAUI app and I installed the extension for the first time on my existing machine configuration.