Search code examples
visual-studio-codesynchronizationsettings

In VS Code, how to sync auxilliary files which settings require?


In my users tasks.json I have

{   
    "type": "shell",
    "label": "CMake-IB: Build Current File",
    "windows": {
        "command": "ibconsole",
        "args": [
            "/command='cmake --build ${command:cmake.buildDirectory} --config ${command:cmake.buildType}  --target \"${file}^\" '",
            "/profile='c:\\ibprofiles\\cmake\\ccache\\ib.xml'"
        ]
    },
    "options": {
        "cwd": "${command:cmake.buildDirectory}"
    },
    "group": "build",
    "problemMatcher": [
        "$msCompile"
    ],
    "detail": "Build the currently selected file with incredibuild",
        
}

which references file c:\\ibprofiles\\cmake\\ccache\\ib.xml. The file should be everywhere that I use vscode. The tasks.json file is automatically synced via vscode sync which is great. However I'd like to move the aforementioned XML file to someplace it will be synced with the settings files. However I only see the following options of what can be synced.

enter image description here

Is there a way to mark a file to be synced and it will appear alongside the settings.json and tasks.json file everywhere and a way to reference it within the tasks.json file?


Solution

  • As far as I know, at the time of this writing, VS Code's Settings Sync feature doesn't have a feature to sync custom files- even contents using the global storage mechanism (source). There's an issue ticket that was used to track that feature-request (syncing global storage), but it was closed as out-of-scope: Allow syncing all files and folder located in ~/…/Code/User/. Some important extensions settings are there. #113774. There might be ways to work around this, but I don't know of them.