Question
· Jul 4, 2025

How to export a project XML file for deploy with Visual Studio Code?

Hello everybody, 

I would like to export project contents using Visual Studio Code, as well as I do with InterSystems Studio.

However, while attempting the export through the InterSystems extension I get the following error:

- There are no folders in the current workspace that code can be exported to.

These are the step to reproduce my error:

  1. Create and save a new VSCode workspace
  2. Open a local directory 
  3. Go to the InterSystems extension
  4. Open "Projects" panel and right-click on the project you want to export
  5. Click on "Export Project Contents"

Anyone can help me solving this issue?

Thank you in advance 

Product version: IRIS 2025.1
Discussion (11)5
Log in or sign up to continue

I think the command to export from a project only exports the project's server-side classes / routines to individual client-side files.

Since your title mentions deployment I'm guessing you want all the project members exported into a single XML file.

An export of multiple server-side items to a single XML can already be done using the `ObjectScript: Export Documents to XML File...` command from Palette. But currently this can't auto-select only the members of a project.

Hi Pietro, the error you're seeing usually means that your VS Code workspace doesn't have any folders opened directly. To fix it, make sure you've opened a folder, not just a file or an empty workspace—go to File > Open Folder..., select the folder where you want the exported files saved, and then try exporting the project again from the InterSystems extension. This should enable the "Export Project Contents" feature to work properly.

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.

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).