I had this problem for a while now and didn’t find any bug report that helped me, after adding the correct ‘nativescript.tnsPath’ to the workspace settings, the problem still exists.
The most funny part, from the Visual Studio Code terminal window, I could call “tns” as normal and it works, so the nativescript-cli is correctly installed.
Just use your normal terminal and navigate into your NativeScript App root folder, use code . to start Visual Studio Code with the actual folder.
There you go, the extension should work properly.
If I start Visual Studio Code from the desktop entry/ terminal, the nativescript folder is still open as last used folder, but I get the “Error: NativeScript CLI not found. Use ‘nativescript.tnsPath’ workspace setting to explicitly set the absolute path to the NativeScript CLI.” again.
I hope this helps someone, too.