microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.59k stars 29.03k forks source link

On Ubuntu 23.04 - VSCODE is failing saying SDK is not installed. #193448

Closed wgrs closed 1 year ago

wgrs commented 1 year ago

Type: Bug

Open vscode Select the Azure extension Create Function Select Folder Select C# .... message says SDK in not installed. Run dotnet --list-sdks ... SDK 7 is installed

VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:51:20.981Z) OS version: Linux x64 6.2.0-32-generic snap Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4 x 2294)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off| |Load (avg)|2, 1, 1| |Memory (System)|7.66GB (5.57GB free)| |Process Argv|--no-sandbox --force-user-env --unity-launch --crash-reporter-id 9ff8913a-8ac5-4e6c-bf7b-542b35364e16| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|wayland|
Extensions (37) Extension|Author (truncated)|Version ---|---|--- namespace|adr|1.1.2 nugetpackagemanagergui|ali|2.0.6 addfileextension|bgs|0.1.4 htmltagwrap|bra|1.0.0 vscode-tailwindcss|bra|0.10.0 path-intellisense|chr|2.8.4 vscode-postgres|cko|1.4.3 gitignore|cod|0.9.0 vscode-markdownlint|Dav|0.51.0 auto-rename-tag|for|0.1.10 rest-client|hum|0.25.1 nuget-reverse-package-search|jes|0.1.68 vscode-azureappservice|ms-|0.25.0 vscode-azurefunctions|ms-|1.12.4 vscode-azureresourcegroups|ms-|0.7.5 vscode-docker|ms-|1.26.0 blazorwasm-companion|ms-|1.1.4 csdevkit|ms-|0.4.10 csharp|ms-|2.1.2 vscode-dotnet-runtime|ms-|1.7.3 vscodeintellicode-csharp|ms-|0.1.26 vscode-edge-devtools|ms-|2.1.3 data-workspace-vscode|ms-|0.5.0 mssql|ms-|1.20.1 sql-database-projects-vscode|ms-|1.2.0 remote-containers|ms-|0.309.0 azure-account|ms-|0.11.5 powershell|ms-|2023.6.0 vscode-nuget-gallery|pat|0.0.24 material-icon-theme|PKi|4.30.1 vscode-xml|red|0.26.1 LiveServer|rit|5.7.9 markdown-preview-enhanced|shd|0.7.9 markdown|sta|2.0.1 vscode-icons|vsc|12.5.0 markdown-all-in-one|yzh|3.5.1 material-theme|zhu|3.16.0 (6 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30803844 2e4cg342:30602488 89544117:30613380 2i9eh265:30646982 showlangstatbar:30737416 962ge761:30835153 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxptcf:30805731 pythonnoceb:30805159 copilotsettingc:30839828 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 dsvsc015cf:30829746 ```
wgrs commented 1 year ago

I have tried with .NET 7 and .NET 8 preview installed . I tried with .Net 7 SDK only Same Result

Possible issue with PATH variable

mjbvz commented 1 year ago

Please file this against the Azure extension

wgrs commented 1 year ago

vscode is not recognising the SDK and neither does the extension.

  1. Run the command :

sudo apt-get update && \ sudo apt-get install -y dotnet-sdk-7.0

  1. Run the command dotnet --info - it says NO SDK FOUND Host: Version: 7.0.11 Architecture: x64 Commit: ecb34f85ec

.NET SDKs installed: No SDKs were found.

.NET runtimes installed: Microsoft.AspNetCore.App 7.0.11 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.11 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download