Repository: vscode
Issue: Incorrect errors shown when launching in remote container (Codespaces)
Labels: bug,tasks,github-codespaces

Type: <b>Bug</b>

When a remote Codespaces container is built and loaded in VSCode for the first time, VSCode seems to be parsing `task.json` or recommending extensions in parallel with installing extensions in `devcontainer.json`. This leads to:
1. False-positive errors printed out around parsing `task.json` (due to an extension installed type not being recognized), and 
2. Extension being recommended to be installed even though it is specified in `devcontainer.json`.

To reproduce:

VSCode browser:
1. Go to https://github.com/Azure-Samples/todo-python-mongo
4. Click on 'Code' -> Create Codespaces environment
5. Wait for Codespaces environment to be fully available


VSCode desktop:
1. Have Codespaces extension installed.
1. Use `Codespaces: New Container` and select Azure-Samples/todo-python-mongo
3. Wait for Codespaces environment to be fully available

Expected:
VSCode should load without any errors.

Actual:
1. In the terminal Output, errors printed our regarding "There is no registered task type 'dotenv'. Even thought this `dotenv` task type is specified by an installed extension (`azure-dev`).
![image](https://user-images.githubusercontent.com/2322434/199616829-b6e9d65a-5154-4462-ad36-c3eccace92da.png)
4. In the bottom right corner, a installer recommendations for "Azure Developer CLI" extension pops up.
<img width="483" alt="Screen Shot 2022-10-21 at 9 14 28 AM" src="https://user-images.githubusercontent.com/297042/197242642-d7374c4c-8ee2-4445-b6a7-0cdf5c37f0df.png">

That's very peculiar, since the Azure Dev extension (with the same identifier) is already installed:
<img width="1068" alt="Screen Shot 2022-10-21 at 9 19 57 AM" src="https://user-images.githubusercontent.com/297042/197242736-dd06df8e-688c-4491-ac37-d9bc0679d5c9.png">

For more context:
https://github.com/Azure/azure-dev/issues/951
https://github.com/Azure/azure-dev/issues/949

VS Code version: Code 1.71.1 (e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb, 2022-09-08T19:56:36.424Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No
Connection to 'codespaces+weikanglim-github-template-test-qvrq7wrxwxf45wp' could not be established
Remote OS version: Linux x64 5.10.102.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.4.0-1094-azure

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz (36 x 3000)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|undefined|
|Memory (System)|63.73GB (28.11GB free)|
|Process Argv|--crash-reporter-id 0ce79a4c-f4f8-4913-a92b-4597f5c231c8|
|Screen Reader|no|
|VM|0%|

Connection to 'codespaces+weikanglim-github-template-test-qvrq7wrxwxf45wp' could not be established

|Item|Value|
|---|---|
|Remote|WSL: Ubuntu|
|OS|Linux x64 5.10.102.1-microsoft-standard-WSL2|
|CPUs|Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz (36 x 2999)|
|Memory (System)|49.99GB (47.96GB free)|
|VM|0%|

|Item|Value|
|---|---|
|Remote|Codespaces|
|OS|Linux x64 5.4.0-1094-azure|
|CPUs|Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (4 x 2793)|
|Memory (System)|7.77GB (6.49GB free)|
|VM|0%|
</details><details><summary>Extensions (30)</summary>

Extension|Author (truncated)|Version
---|---|---
codespaces|Git|1.13.1
better-cpp-syntax|jef|1.16.3
jupyter-keymap|ms-|1.0.0
remote-containers|ms-|0.255.4
remote-ssh|ms-|0.90.1
remote-ssh-edit|ms-|0.84.0
remote-wsl|ms-|0.66.3
kuskus-kusto-syntax-highlighting|ros|1.1.21
vscode-eslint|dba|2.2.6
codespaces|Git|1.13.1
vscode-pull-request-github|Git|0.50.0
azure-dev|ms-|0.3.0
vscode-azureappservice|ms-|0.24.5
vscode-azurefunctions|ms-|1.8.3
vscode-azureresourcegroups|ms-|0.5.6
vscode-azurestaticwebapps|ms-|0.11.3
vscode-azurestorage|ms-|0.15.0
vscode-azurevirtualmachines|ms-|0.6.2
vscode-bicep|ms-|0.11.1
vscode-cosmosdb|ms-|0.19.2
vscode-docker|ms-|1.22.2
vscode-dotnet-runtime|ms-|1.5.0
python|ms-|2022.16.1
vscode-pylance|ms-|2022.11.10
jupyter|ms-|2022.8.1002431955
jupyter-keymap|ms-|1.0.0
jupyter-renderers|ms-|1.0.9
azure-account|ms-|0.11.2
azurecli|ms-|0.5.0
vscode-node-azure-pack|ms-|1.1.0

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
pyindex848cf:30577861
nodejswelcome1cf:30587006
fc301958:30595537
2e4cg342:30596373

```

</details>

<!-- generated by issue reporter -->