microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
229 stars 12 forks source link

The Preferred Android SDK/Java SDK directory was not used. But WHY? [Found the problem] #561

Closed hutiwephy closed 1 year ago

hutiwephy commented 1 year ago

Type: Bug

Setup

Install Everything acording to instruction except Android Studio

On Android Studio:

Why the custom directory

multi-user and space saving (Blame on Google)

Why not using Visual Studio

Can't use VS2022 I'm required to use VS2019 due to NodeJS node-gyp incompatibilities and the pain it is to reconfigure. Also SPACE SAVING and where are the damned installers for the 2019 build tools Microsoft?

As expected works like a Microsoft Product!

PS: I've already tried the Pre-Release version

More Info

Extension version: 0.4.3 VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:55:25.390Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 x 3302)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.70GB (4.49GB free)| |Process Argv|.| |Screen Reader|no| |VM|0%|

VS bug #1902857

hutiwephy commented 1 year ago

Found the problem!

apparently when running VSCode replaces the char " with ' and MSBuild doesn't like it

this:

dotnet build -t:Run -p:Configuration=Debug -f net7.0-android -p:AdbTarget=<target> -p:AndroidAttachDebugger=true -p:AndroidSdbTargetPort=<adb port> -p:AndroidSdbHostPort=<adb port> -p:AndroidSdkDirectory='<sdkpath>' <csproj path>

should be this:

dotnet build -t:Run -p:Configuration=Debug -f net7.0-android -p:AdbTarget=<target> -p:AndroidAttachDebugger=true -p:AndroidSdbTargetPort=<adb port> -p:AndroidSdbHostPort=<adb port> -p:AndroidSdkDirectory="<sdkpath>" <csproj path>

the affected arg is: -p:AndroidSdkDirectory='<sdkpath>'