Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable version! #329

Closed
crper opened this issue Nov 20, 2015 · 137 comments
Closed

Portable version! #329

crper opened this issue Nov 20, 2015 · 137 comments
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues on-testplan
Milestone

Comments

@crper
Copy link

crper commented Nov 20, 2015

You can provide a portable version of it? Or to support the configuration file or plug-sync to the cloud;
Otherwise, each computer must be installed once, configured once. . It is a waste of time;

Thank you

@joaomoreno
Copy link
Member

There are portable versions of Code for every platform. Including Windows.

@bpasero
Copy link
Member

bpasero commented Nov 20, 2015

I dont think we are portable until we allow to specify the directory where data should go (including extensions). Reopening.

@bpasero bpasero reopened this Nov 20, 2015
@bpasero bpasero added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Nov 20, 2015
@weeblr
Copy link

weeblr commented Nov 28, 2015

Indeed. This is a requirement for people like me, switching from laptop to desktop very often: entire workflow is on an external ssd drive, not relying on local machine storage. As with other portable apps, basically all data pertaining to the app (code, config, any extension)should reside in a single folder, and use relative folders so that that folder can be moved around and app starts up and operate the same.
Thks.

@weeblr
Copy link

weeblr commented Dec 1, 2015

Another thing I noticed is that deleted items are moved to the Trash bin (on win 7). That's also not portable, as it means deleted items will be left on the current machine when moving to another one.

@bpasero
Copy link
Member

bpasero commented Dec 1, 2015

Nice catch :)

@weeblr
Copy link

weeblr commented Dec 1, 2015

Thanks ;) Maybe you can have a look at #851. It's somehow related in that it deals where Code data is stored.

Cheers

@jrappen
Copy link

jrappen commented Mar 9, 2016

Problems reported above still remain, but here is a portable download for Windows:

@MarcoPeraza
Copy link

MarcoPeraza commented Apr 15, 2016

Any chance that the insider builds can be made available as a zip file as well? I tried this URL and got a 404: https://code.visualstudio.com/Docs/?dv=winzip&build=insiders

@joaomoreno
Copy link
Member

@Tyriar
Copy link
Member

Tyriar commented Apr 15, 2016

FYI after #3068 you will be able to make vscode mostly portable by downloading the zip and using the --user-data-dir flag to specify a readable location. That sets the user configuration directory, however extensions will still look in the same spot.

@enjikaka
Copy link

Is there a way to get portable configs? In other words, get my badass conf'd VS Code at my work computer to my other computers without manually installing everything?

@Tyriar
Copy link
Member

Tyriar commented Apr 23, 2016

@enjikaka there are a few issues related to that:

@bpasero
Copy link
Member

bpasero commented May 5, 2016

@Tyriar I think we are good, the extensions location can be set via extensionHomePath

@RDeluxe
Copy link

RDeluxe commented May 5, 2016

Could somebody sum up all this in a readable fashion ? I downloaded the insider zip and tried to launch vs code with --user-data-dir without success (does not prompt anything)

This is a must have for such a lightweight editor (as ST, it's going to sit in my dropbox ;) )

@CNMan
Copy link

CNMan commented May 5, 2016

@RDeluxe have same issue

@Tyriar
Copy link
Member

Tyriar commented May 6, 2016

@bpasero do you know if ~/.cache/Code is something we need to worry about for this?

@bpasero
Copy link
Member

bpasero commented May 6, 2016

@Tyriar I am not sure who creates that folder, what are the contents?

@Tyriar
Copy link
Member

Tyriar commented May 7, 2016

@bpasero nothing for all variants on my machine. Failing to create the directory might be the reason it's not working currently though.

@yaneony
Copy link

yaneony commented Mar 23, 2018

@ugurkoysuren that is why people are looking for much more "portable way" usage of VSCode. The only possibilities are for right now:

  1. Creating link (desktop or whatever you want) with parameters
  2. Creating .bat file
  3. Using some wrapper app like one i've made

@fbehrens
Copy link

Hi, I just want to report here as I am forced to work under different profiles on windows it was suffering from the lack of a portable version. Only after some time I took the time to find out about the user and extensions directory, and come up with the quite simple solution to copy and then modify the existing .\bin\code.cmd wrapper by adding the --user-data-dir and --extension-dir parameters.

call "c:\tools\vscode\app\Code.exe" "c:\tools\vscode\app\resources\app\out\cli.js" "--user-data-dir" "c:\tools\vscode\user" "--extension-dir" "c:\tools\vscode\ext" %*

The solution is quite simple, but it took me some time and hazzle.

The portable version should integrate this functionality out-of-the box in some way, to make VSCode more approachable. Thanks and appreciation for this great editor

@bardware
Copy link

I tried a bit differently today. I called code . --extensions-dir "C:\vscode\php\exts" --user-data-dir "C:\vscode\php\data" --new-window.
Two instances of code were started. I saw this behaviour before, when I called code ., therefore the additional argument --new-window. It seems it is not respected when --extensions-dir and --user-data-dir are provided.

@stkb
Copy link
Contributor

stkb commented Apr 12, 2018

Maybe we could agree on a spec that might eventually lead to a PR. Other programs check on startup for the presence of settings files/dirs next to the executable, and if they exist, use those instead of AppData/whatever.

So I'd propose: if a folder extensions exists next to code.exe, use it for the extensions dir. If a folder data exists, use it for the user data.

Or an alternative: just check for a data folder and if it exists, store user data there and extensions in an /extensions subfolder under that.

Note this is Windows-specific. It's also a little different from I think the portable-apps way of having separate /app and /data dirs, but I'm not sure that would work.

Thirdly I don't know how this would work with updates. Does the update process blow the whole vscode directory away? Does it touch the files in the userdata folder?

Relevant:

@notrealdev
Copy link

Three years have passed and MS has not yet supported portable version for VSC lol

@hellboy81
Copy link

The same issue

@vanja-san
Copy link

vanja-san commented Apr 28, 2018

I do not know all paths where folders are created after VSCode starts, if you know, tell me, I'll check. But these two ways no longer appear in the system (Extensions and Data)! Forgot to say, VSCode is launched with administrator rights! Sorry for my English!

At me like works.
I took a variant from above: --user-data-dir and --extension-dir.

  • I downloaded VSCode. Not installer, but archive. In official site.
    2018-04-28-20-26-26
  • Unpacked where necessary.
  • I created a shortcut next to Code.exe.
  • In properties of shortcut, added:
    "C:\Portable Soft\VSCode\Code.exe" --extensions-dir "C:\Portable Soft\VSCode\extensions" --user-data-dir "C:\Portable Soft\VSCode\data"
    2018-04-28-19-00-03

After launching the shortcut, folders were created - data and extensions.
Extensions are also installed in a folder where I indicated. Extensions are installed and working perfectly!
As far as I understand, this is a portable version of VSCode !? Everything works fine. Running is done through created shortcut, and nothing superfluous is created in system.

2018-04-28-19-04-05_li

2018-04-28-19-04-46_li

2018-04-28-19-05-08_li

@rlabrecque
Copy link

I believe as per some of the above comments, there are a couple cases where it still will end up dumping files in AppData with that setup.

@Ianfinn1994
Copy link

Ianfinn1994 commented May 24, 2018

Would there be a way to address this on a Mac?

@joaomoreno
Copy link
Member

Portable mode is on its way to Insiders with e43ab4e

Early docs: https://github.com/Microsoft/vscode-docs/blob/vnext/docs/editor/portable.md

@Ianfinn1994
Copy link

Ianfinn1994 commented Jun 18, 2018 via email

@AbhishekTripathi
Copy link

Excellent. So now there will be true portability in VSCode. Which stable channel release/version is expected to carry these bits?

@joaomoreno
Copy link
Member

It will come out in 1.25 (June's release).

@IzakMarais
Copy link

IzakMarais commented Jul 6, 2018

Is there documentation for migrating my existing installation to Portable Mode? I assume I would need to copy the contents of some folders and paste them into the new install path somewhere...

I looked in the docs but found nothing.
I am on Windows.

EDIT: I have found the description here in #53653 and will try it.

@jlanza
Copy link

jlanza commented Jul 6, 2018

My guess is copy the extensions and user-data folders to the new data folder.

@schlamar
Copy link

schlamar commented Jul 6, 2018

My instructions in #53653 should work.

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues on-testplan
Projects
None yet
Development

No branches or pull requests