command 'extension.addObjectExplorer' not found when using VS Code mssql extension

Viewed 1987

VS Code team finally dropped the long-awaited SQL Object Explorer feature in its mssql extension the other day. However, when I click the SQL Server icon in the tool bar, I get an error message command 'extension.addObjectExplorer' not found

Uninstalling the mssql extension, and restarting/reinstalling it didn't help.

I thought this might be a package build issue, but I don't see any such issue reported on github or anywhere on the internet.

Did anyone experience this issue?

2 Answers

I was experiencing this issue. In my case this issue was resolved by uninstalling the SQL Server (mssql) extension, deleting the existing extension files, and reinstalling the extension. Check the output windows "Log (Extension Host)" view for the exact path on your system. On my system it was:

.vscode/extensions/ms-mssql.mssql-1.7.0

Updating to the latest version did not resolve the issue in my situation, and neither did simply uninstalling and re-installing the extension. I needed to delete the extension from disk as well.

Yes, I'm experiencing the same issue.
After clicking the server icon. the log output shows this:

Installing SQL tools service to c:\Users\username\.vscode-insiders\extensions\ms-mssql.mssql-1.7.0\sqltoolsservice\1.7.0\Windows. Downloading https://download.microsoft.com/download/c/2/f/c2f482e1-ceb3-4f6a-a8b7-1f8115fc0a44/microsoft.sqltools.servicelayer-win-x64-netcoreapp2.2.zip (43780 KB) .................... Done! Installing ... [ERROR] Error: ENOENT: no such file or directory, open 'c:\Users\username\.vscode-insiders\extensions\ms-mssql.mssql-1.7.0\sqltoolsservice\1.7.0\Windows\api-ms-win-core-console-l1-1-0.dll'

Adding a new server connection results in the error you describe.
It refers to a non-existing file and directory structure.

Related