I had the same problem, that this feature simply didn't seem to work — but now I have found a way to make it work.
For this feature to work, the active server connection must be defined in the .code-workspace file.
I have described more details here: https://community.intersystems.com/post/how-export-project-visual-studio...
I had previously assumed that it was sufficient for the feature if there was an active server connection in the first place, regardless of where it was defined.
I just found a combination of vs code workspace configuration that worked! 🎉
You have to use a Multi-Root-Workspace with at least one folder in the local filesystem (usually the folder in which the .code-workspace file is stored) and at least one server-side virtual folder.
The later is necessary to enable the Project Explorer in the InterSystems view container, where you can select the "Export Project Contents" option.
AFAIK, this is the only way to execute this command in VS Code.
The feature "Export Project Content" now only works as expected, if (and in my experience only if) the IRIS server connection is defined in the .code-workspace file of the current workspace.
{
"folders": [
{
"name": "Local Root Folder"
"path": ".",
},
{
"name": "Server Folder: local-iris:IRISAPP (read-only)",
"uri": "isfs-readonly://local-iris:irisapp/?mapped=0&system=0",
},
],
"settings": {
"intersystems.servers": {
"local-iris": {
"webServer": {
"scheme": "http",
"host": "localhost",
"port": 52773,
},
"username": "_SYSTEM",
},
},
"objectscript.conn": {
"server": "local-iris",
"ns": "IRISAPP",
"active": true,
},
},
}
It won't work (as reported here and in other posts) if there is an active server connection that is defined in any other place, e.g. in .vscode/settings.json.
@Brett Saviano is this what you meant in your previous answer?
Overall, I'm a bit disappointed that this feature is only available for this one specific setup. I think it should be usable as soon as i have an active server connection to a namespace in iris.
If the connection is defined in a .vscode/settings.json, then the files should be exported to the src folder ((or whatever is defined in the setting objectscript.export.folder)) next to the .vscode folder.
Additionally, it would be nice if this feature will be registered as a separat command in vscode, such that is not anymore necessary that the project explorer view is displayed (which is only the case if at least one server-side virtual folder is defined in the current multi-root-workspace).