vscode: Can no longer sync extensions by copying extensions folder because of new extensions.json file
Does this issue occur when all extensions are disabled?: N/A
- VS Code Version: 1.74.0
- OS Version: 2 Windows machines with different extension paths and/or usernames.
- This more than likely replicates as an issue on non-windows machines but I haven’t tested it.
Steps to Reproduce:
- Copy
%userprofile%\.vscode\extensionsfrom one machine to another. Both with active vscode installations. - Launch vscode on secondary machine.
- The machine with the copy of the extensions folder doesn’t load any extensions.
- Close vscode on secondary machine.
- Change all instances of the
fsPathproperty in%userprofile%\.vscode\extensions\extensions.jsonto match the new machine’s username ex"fsPath":"c:\\Users\\USER1\\.vscode\\extensions\\author.extensionID"into"fsPath":"c:\\Users\\USER2\\.vscode\\extensions\\author.extensionID" - Re-launch vscode on second machine.
- Note that extensions now load correctly.
I don’t know when this extensions.json file was added but previously doing this copy paste procedure of the extensions folder simply copied all installed extensions without issue. Now the newly added extensions.json file must be altered for it to work. This makes syncing extensions to a machine by USB or file-sync significantly more annoying.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (7 by maintainers)
I tested the Visual Studio Code Insiders version 1.75.0-insider.
It appears to correctly migrate extensions between different machines with different paths even when vscode is not on during the copy. The copy includes all extension files including the
extensions.jsonfile. It also appears that thefspathproperty is nowlocationand the value is relative as you indicated.I can confirm the issue appears fixed on the insiders version indicated. I look forward to the new version release. Thank you.