Reputation: 24019
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
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
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
Reputation: 31
Upvotes: 2
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
Reputation: 5398
And drag-n-drop to the Applications
folder.
Restart VSCode
Upvotes: 12
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
Reputation: 31
2 ways of resolution:
Drag the vscode app icon from downloads to application if you have downloaded fresh
Hold CMD key and drag the vscode app icon from application to download and back to application
Upvotes: 3
Reputation: 49570
Moving VSCode
to Applications
folder and then restarting Mac worked for me.
Upvotes: 2
Reputation: 1269
In case anyone encounter this and VS Code was already in your Applications Folder...
Downloads
folder.Applications
folder.Upvotes: 80
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
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.
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