VS Code Export Naming Query

I have a VS Code Project with multiple sub projects as they all share common base class code and some resources.  When I export the sub project they are always named with the name of the parent project.  Is it possible to control this somehow so that the output file so it takes its name from the sub project name?  Otherwise when I export all the projects they overwrite each other.

  • Yeah, that's what I figured, but again there's no concept of "subprojects" in VS Code as far as I know, so I'm not sure how that's supposed to work. Do you literally only have one project in the workspace which contains *everything*?

    Normally, to add multiple projects to VS Code, you would start by opening one folder for your first project, then add subsequent projects using "Add Folder to Workspace".

    That way you'd have multiple self-contained projects in the same workspace (a "multi-root workpace"), and you shouldn't need to worry about the various issues you've mentioned with conflicting export names, etc. i.e. Building or exporting one project wouldn't affect your ability to build or export another project.

    To handle your shared code folder(s), you could open them as a separate "project" which can't be built.

  • OK, I think it is working now.  Although I need to run the export from the cmd prompt to get the exports working reliably.  Looks like I ended up with a "multi-root workspace" by handcrafting the vscode config files.  So I have the Base Class project and all the child projects as independent folders under the main workspace.  Each child folder has it's own .vscode folder with its own launch.json.  Then the references to the Base Class code is via the jungle files.

    I just need to graple with VS code to make the cmd line exporting a little more seemless.

    Thanks for your help.

  • iq files are actually zip files that you can open as zips.  You may want to check the content.  an iq file has it's own manifest.xml file, so check that for things like the correct manifest id, targets, permissions, etc.

    It sounds to me your setup would be much easier using barrels or common folders by way of a jungle file per app.

  • It was some time ago when I made the design decision on this aspect of the architecture.  But from memory I had a problem using barrels as the base class code is in the View class which is then extended in the sub projects.  I seem to remember I has issues trying to get this to work within a barrel.

  • I use barrels or shared folders in many of my apps with zero problems  barrels do have a bit of overhead, so I lean to shared folders.

  • It sounds to me your setup would be much easier using barrels or common folders by way of a jungle file per app.

    He's using common folders via jungles.

    Then the references to the Base Class code is via the jungle files
  • Although I need to run the export from the cmd prompt to get the exports working reliably. 

    Yeah, this shouldn't be necessary. I wonder what would happen if you just tried a toy example with two simple projects - add one at a time to the same multi-root workspace as separate projects.

    Export should work fine for both of them without any workarounds.

  • When I select "Monkey C: Export Project" from the Command Palette it offers me no selection of which project to export.  Is there a way to select which of the Project\Folder to use for the export?

  • Open an mc file for the project you want to export, and then right click on that editor window to get to the command pallet .  That app will be exported.  There are other things where you need to use an open editor window with the command pallet like "edit products". 

  • Open an mc file for the project you want to export, and then right click on that editor window to get to the command pallet .

    Thanks for that, that makes it more useable.