VS Code Portable is a portable version of the popular Visual Studio Code application.
To recompile this PAF you must use my PortableApps Compiler.
All downloads available in the Releases section. This portable application was packaged using a modified version of the PortableApps.com Launcher.
- Runs the full Visual Studio Code desktop app.
- Completely portable - runs off a USB, cloud drive (DropBox, iCloud drive, OneDrive, etc) or hard drive.
- No need for any external software - simply download extract and run!
- Packaged in PortableApps.com format for easy integration.
- User configuration file for advanced portable settings (See Configuration below)
- Allows for some developmental environments to be recognized by Visual Studio Code across various devices (See Environments below)
- Associate compatible filetypes on launch for use when using VS Code Portable (See Associations below)
- Automatically install VSIX extentions on first launch. (See VSIX Installations below)
- Self-sustaining; no need to update this package as it should update itself.
- Microsoft Windows 7 or later.
- At least v4.5 of the .NET Framework
- PortableApps.com Platform (Optional)
- An optional user configuration file called
VSCodePortable.iniis available in the VS Code Portable root directory (i.e.VSCodePortable\VSCodePortable.ini).- If this file somehow becomes corrupted or you just need to go back to a default state, there's a default user configuration file located in the
Sourcefolder located at.\Other\Source\VSCodePortable.ini - Copy this file to the root directory next to the launcher file (
VSCodePortable.exe) to reset these options.
- If this file somehow becomes corrupted or you just need to go back to a default state, there's a default user configuration file located in the
- Refer to the Example section for a brief explanation for each user configuration option.
[VSCodePortable]
AdditionalParameters=
RunLocally=false
Banner=true
Associations=true
UpdateCheck=true
InstallVSIX=false
#= Environment Settings
; Uncomment below congifurations to make use of it's setting
;GIT=%PAL:CommonFiles%\Git
;PYTHON=%PAL:CommonFiles%\Python
;NODEJS=%PAL:CommonFiles%\Node.js
#= Advanved Settings
; Uncomment below congifurations to make use of it's setting (true|false)
;GitHomePath=true
;PythonUserPath=true
;NodePrefixPath=true
#= Banner=
; Enable or disable Initialization Banner.
#= UpdateCheck=
; Enable or disable automatic portable updating (true|false).
#= InstallVSIX=
; Enable or disable the installation of VSIX files
; in .\App\DefaultData\extensions (true|false)
#= Associations=
; Optionally turn on/off filetype associations (true|false).
; For more information refer to the ReadMe.txt file located at:
; .\Other\Source\ReadMe.txt
#= AdditionalParameters=
; Pass additional command-line switches.
#= RunLocally=
; Application is copied to & executed from $TEMP directory.
#= GIT=
; Path to the Git directory
#= GitHomePath=
; Change Git home path to "Data\Git\home"
#= PYTHON=
; Path to the Python directory
#= PythonUserPath=
; Change Python user path to "Data\Python"
#= NODEJS=
; Path to the NodeJS directory
#= NodePrefixPath=
; Change Node.js (npm) prefix path to "Data\Node.js\npm"VS Code Portable has support for certain development environments (i.e. Git, Node.js, etc).
To set up your development environments, follow the steps below.
- Using your preferred text editor, open the optional user configuration file located in the base directory (i.e.
VSCodePortable\VSCodePortable.ini).- Refer to Configuration for more information.
- Underneath the comment line
#= Environment Settingsyou'll find some preconfigured environment options you can set.- Uncomment the environments that pertain to you by deleting the semi-colon at the beginning of that line.
- Add the path to that corresponding environment after the equals symbol (e.g.
GIT=%PAL:CommonFiles%\Git). - If the path doesn't exist, then that option is simply ignored.
Note
VS Code Portable supports all Windows environment variables including all standard Portable Apps Compiler and PortableApps.com ones too. For instance:
%APPDATA%%PAL:CommonFiles%
Important
Do not point to any bin directories directly. This is automatically done by the Launcher.
Tip
To see if you're development environment was recognized by VS Code Portable, use the Visual Studio Code terminal to check for your environment's version.
git --version
To add support for an environment that is not preconfigured already, follow the steps below.
- Using your preferred text editor, open the launcher configuration file located in the app directory (i.e.
VSCodePortable\App\Launcher\VSCodePortable.ini).- Refer to the Launcher.ini documentation section for more information.
- Underneath the
[Environment]section, add any necessary paths to your environment's applicable variables.- For instance, for JDK support, you could add
JAVA_HOME=%PAL:CommonFiles%\jdk-21which would point toX:\PortableApps\CommonFiles\jdk-21
- For instance, for JDK support, you could add
Note
You could add your environment to the system's path environment variable by simply appending your environment's path to it. The following is an example of how an Android Studio/SDK environment might look.
[Environment]
ANDROID_HOME=%PAL:CommonFiles%\Android\sdk
ANDROID_USER_HOME=%PAL:DataDir%\.android\
STUDIO_JDK=%PAL:CommonFiles%\JDK64
PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\tools\bin;%ANDROID_HOME%\platform-toolsTip
To see if you're development environment was recognized by VS Code Portable, use the Visual Studio Code terminal to check for your environment's version.
adb version
- Try ensuring your environment is portable by having it's files installed in the Portable Common Files folder located at `X:\PortableApps
- To install VSIX extensions on the first initial launch of VS Code Portable, be sure to set
InstallVSIXto true in the optional user configuration file located in the base directory (i.e.VSCodePortable\VSCodePortable.ini).- Refer to Configuration to read more.
- Put any VSIX extension file in the default data directory under the extensions folder located at
.\App\DefaultData\extentions- Any file with an extension of
.vsixwill automatically be installed in the VS Code extensions directory for use with Visual Studio Code.- You can find this directory in
.\Data\code\extensions
- You can find this directory in
- Any file with an extension of
Important
Do not associate any filetypes through the Visual Studio Code application. Doing so will cause trash to remain in the Windows Registry after exiting VSCode Portable.
- Enable associations in the optional user configuration file located in the base directory (i.e.
VSCodePortable\VSCodePortable.ini).- Refer to Configuration to read more.
- The Launcher has been designed without administrative privilege dependency. Features which require elevated privileges have been made optional in the optional user configuration file.
- Refer to Configuration to read more.
To have VSCode Portable associate compatible filetypes for use with Visual Studio Code just follow these simple steps:
- Navigate to:
.\App\AppInfo\Launcher - Open
VSCodePortable.iniwith Notepad or any text editor - Scroll down to:
[Associations] - Simply add desired association underneath in numerical sequential order.
- See the example for more.
[Associations]
1=txt
2=ini
3=xml
4=js
5=cssNote
- Adding too many can impact launch time.
- Windows XP cache icons which are visible even after exiting VSCode.
- Windows 8.0 is problematic and may require unlocking for some filetypes (i.e. Double-click file > select VSCode from list). This is due to Win8.0's implementation of a hash ID for associations.
- Do not associate through Visual Studio Code! Doing so will leave trash in the Windows Registry.
- In addition, SendTo is available for un-associated but supported filetypes.
- Visual Studio Code Portable is a redistribution of the Visual Studio Code, developed by Microsoft..
- PortableApps.com Suite by PortableApps.com.
- PortableApps Compiler developed by daemon.devin.