StudioTime
StudioTime

Reputation: 24019

Why doesn't VS Code auto update on macOS?

I have VS Code on Windows and macOS, on Windows it auto updates but on macOS it doesn't.

How do I get VS Code to auto update on macOS?

Upvotes: 54

Views: 74516

Answers (11)

bharathivkmani
bharathivkmani

Reputation: 59

For mac os : Close the vs code application. Search for the file Visual Studio Code.app in finder and drag and drop it in Applications. Reopen the vscode from Applications and now "check for updates" works.

Upvotes: 1

John Tackman
John Tackman

Reputation: 1

macOS may assign a quarantine attribute to downloaded applications to protect users from potentially harmful software. This attribute can prevent applications from performing certain actions, including auto-updating.

You can drag the application back to Downloads if it's already in Applications and then to Applications to clear this flag, or you can run this command:

xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app

This command is used to remove the quarantine attribute from VS Code. By running this command, you are explicitly clearing any quarantine flags that may be preventing the application from updating properly.

Do note that moving the file or running this command is technically circumventing builtin safeguards and if your downloaded app in fact is NOT visual studio code, you may expose yourself to malware. It may be in your best interest to delete the app if it's not updating properly and re-download the software from the trusted distributer, verify the checksum if available and then retry the dragging or xattr method if needed.

So, if VS Code is in the Applications folder but still has issues with updating, it’s possible that the quarantine state or related file system attributes are the cause. Clearing these attributes with the xattr command or by moving the file should help resolve the problem, but do make sure you are working with the correct file.

Upvotes: 0

Sezo Hessen
Sezo Hessen

Reputation: 31

  1. Open Settings
  2. Privacy & Security
  3. Select Full Disk Access
  4. Check VS code then restart VS code and try install updates

Upvotes: 2

Shubham
Shubham

Reputation: 31

I was having the same issue even though my VS Code was in Applications folder. To solve the issue:

~ Exit the VS Code if open.

i. I moved the VS Code from Applications folder to Downloads folder completely (make sure you move it and not just create a copy of it. You can do that using command key file moving the VS Code)

ii. Moved the VS Code back from Downloads folder to Applications folder.

iii. Open the VS Code back again.

Upvotes: 2

Nagibaba
Nagibaba

Reputation: 5398

  1. Right-click on the app and locate it in finder:

enter image description here

  1. And drag-n-drop to the Applications folder.

  2. Restart VSCode

Upvotes: 12

ru4ert
ru4ert

Reputation: 1179

Solution if @StudioTime's solution is not working:

Terminal:

sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt/*
xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app

Upvotes: 2

Venkatesh Das
Venkatesh Das

Reputation: 31

2 ways of resolution:

  • Way 1

Drag the vscode app icon from downloads to application if you have downloaded fresh

  • Way 2

Hold CMD key and drag the vscode app icon from application to download and back to application

Way 2

Upvotes: 3

GorvGoyl
GorvGoyl

Reputation: 49570

Moving VSCode to Applications folder and then restarting Mac worked for me.

Upvotes: 2

Patze
Patze

Reputation: 1269

In case anyone encounter this and VS Code was already in your Applications Folder...

  1. Quit VS Code in case it was running (make sure with CMD⌘+Q)
  2. Hold CMD⌘ + drag (so that it moves the app instead of making a shortcut) the VS Code app back to the Downloads folder.
  3. Hold CMD⌘ + drag the VS Code app back to the Applications folder.
  4. Now update should be possible :)

Upvotes: 80

BaMoo
BaMoo

Reputation: 181

I solved my problem with this command:

xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app

source: naveendhanaraj.wordpress.com

Upvotes: 18

StudioTime
StudioTime

Reputation: 24019

VS Code on macOS will not auto update if it's running from a read-only folder.

If you downloaded and are running VS Code from your Downloads folder, which is read-only, it will not auto update.

Solution:

When you've downloaded VS Code, drag the downloaded file to your applications directory and run it from there instead.

enter image description here

It will now auto update

Thanks to @gino mempin in the answer to my previous question for the inspiration How to turn on auto search on VS Code on macOs?

Upvotes: 115

Related Questions