Question
· Jan 17, 2024

How to export a project via Visual Studio Code?

Hi everyone, 

Does anyone know how to export projects via VSC? 

I opened the project through the "InterSystems Tools" plugin (command is "Edit Code in Project") and I can correctly work on it.

However, when I try using the "ObjectScript" plugin to export the project (right click on the project -> "Export Project Contents")

This message appears and it is not possible to export the project:

I've tried also to open a new window, then a folder and finally the project, but nothing changes. 

This is an example of my workspace: 


Anyone knows how to do it? 

Thank you! 

Product version: IRIS 2021.1
Discussion (6)4
Log in or sign up to continue

Hi Brett, Unfortunately, your answer is not fully satisfactory, as Export Documents to XML File... does not automatically export the project and all its content (at least not for me), and it doesn't fire the server-side studio extension hook "ExportProject" that in our case would automatically

* Check that the project contains all necessary classes and files by checking the content of about 1000 classes.

* Export the project's individual files for server-side source control into individual files.

* Export the entire project into a single XML file to be given away or as a backup of the project at a certain point in time.

Am I missing something, or is that very convenient method of automation not possible with the VS Code integration?

* Check that the project contains all necessary classes and files by checking the content of about 1000 classes.

* Export the project's individual files for server-side source control into individual files.

* Export the entire project into a single XML file to be given away or as a backup of the project at a certain point in time.

Am I missing something, or is that very convenient method of automation not possible with the VS Code integration?

 

Ah I forgot to mention ExportProject is in our case fired by "OnBeforeLoad" of any prj file and on OnAfterSave if an "prj" item saves. Unfortunately these two operations seem to never fire when working with projects in VS Code

Hi @Stephan Gertsobbe, there is no exact equivalent for exporting an entire Studio project in a single XML file. The command I mentioned is the closest approximation. The best workaround is to use a terminal to do the export. Since you mentioned using these exports for backup and that you have server-side source control in use, I would expect that your files being tracked in source control would constitute the backup. 

Source control support for projects files themselves is limited due to the way we edit them. The Atelier REST API used by VS Code has no support for Studio Projects since the concept didn't exist in Atelier. VS Code uses SQL to modify projects instead. This mechanism was chosen for its backwards compatibility since Studio Projects users tended to be on older server versions. Source control UserActions are fired for projects, but not all of the lifecycle hooks will because we are not using object access.