Failed to install visual studio code update как исправить

I am trying to update my VS Code but am getting an error message: Updates may fail due to anti virus software and/or runaway processes.

A log file stemming from my Users was attached, but I am not sure what to check for. I am still new to computers and programming.

asked Nov 8, 2020 at 21:28

romanxyz123's user avatar

1

I copied the Code.exe file from where my program was installed and pasted it to the temp map: C:UsersYOUR_USERNAMEAppDataLocalProgramsMicrosoft VS Code
I reran the update and it works.

answered Feb 22, 2021 at 18:27

Aventis's user avatar

AventisAventis

1212 silver badges5 bronze badges

Run the update setup file, with a name like “CodeSetup-stable-…exe”, in the following location:

C:Users<:User>AppDataLocalTempvscode-update-system-x64

Replace <:User> with your username. And make sure VS Code is closed.

The same problem happened to me as well. It was because I installed VS Code in another directory other than the default location. The problem happened because after downloading the update in the Temp directory, VS Code tried to locate the previous installation in the default location to update it. As it failed, the update setup file remained with the temporary files. The problem was solved by manually installing the update.

answered Oct 14, 2021 at 7:52

Shashoto Nur's user avatar

This is how I resolved the problem:

  1. Close VSCode.
  2. Run VSCode AS ADMINISTRATOR by right clicking in the VS Code icon. This process opens VScode.
  3. Now run the same VSCODE update as usual from inside VSCode.
  4. VSCode closes after the update process and the latest VSCODE version is installed.

Nimantha's user avatar

Nimantha

6,5736 gold badges27 silver badges67 bronze badges

answered May 31, 2022 at 19:29

Jose P Fernandez's user avatar

0

This happens because you installed VSCode in a specific directory, delete and download again but leave the default directory. This is because the update file looks for the default directory

answered Jul 14, 2021 at 16:53

Josué Mendonça's user avatar

This problem appeared to me because I moved the files of the setup of the vscode from Partition to another, and the solution was very simple. I opened the file that was in the path that appeared in the alert, and the problem was solved.

Just make sure any instance vscode was closed!

answered Aug 27, 2022 at 18:17

Marim mohamed's user avatar

While checking and installing updates for Visual Studio Code on a Microsoft Windows 10 Version 1909 (OS Build 18636.719), vscode icon disappears and updates do not complete and throw an error with this message:

“Updates may fail due to anti-virus software and/or runaway processes. Please try restarting your machine before attempting to update again.”

I’ve checked all this and everything is good. What I noticed was that the path to the actual executable file (Code.exe) is located in the underscore sub-folder and not in the parent Microsoft VS Code folder (i.e, “C:Users<username>AppDataLocalProgramsMicrosoft VS Code_Code.exe” ).

The target location is set to (i.e, “C:Users<username>AppDataLocalProgramsMicrosoft VS CodeCode.exe”) and not (i.e, “C:Users<username>AppDataLocalProgramsMicrosoft VS Code_Code.exe”). I have include a screenshot for your convenience.

Thank you.

2020-03-10_16-23-50

Have you ever encountered trouble with your Visual Studio Code not updating or showing the “Update Failed” or “Failed to install update” error?

These problems are common when working with an advanced text editor such as Visual Studio Code. The update usually provides the user with a variety of support from the developer, ranging from bug fixes to new features that will improve the experience of using the application. Most of the time, these issues are easily fixable, and you will be back to working on your application in no time!

In this article, I will explain all the steps you can take to fix the problem of your Visual Studio Code not updating.

Table of Contents
  1. 1. Restart the Visual Studio Code Application
  2. 2. Repairing Your Visual Studio Code
  3. 3. Disable Your Antivirus
  4. 4. Ensure Your Visual Studio Code Runs in Administrator Mode
  5. 5. Delete the Installer Folder
  6. 6. Remove All Installation Files

1. Restart the Visual Studio Code Application

Restarting visual studio code is one of the most common ways that users report that they have fixed the problems they were facing with the update. At times, due to caching problems, an application needs to be restarted for the updates to take effect. This is one of the reasons why your Windows computer asks you to restart your system after an update is downloaded so that you can install it.

You can restart your Visual Studio Code by

  1. Open the command palette or press Ctrl+Shift+P
  2. Type the following:
    > Reload Window

Another way, which is rather traditional, is to close your visual studio code application and restart your computer. Upon restarting your system, follow the following steps:

  1. Right-click on your Visual Studio Code application icon and click “Run as Administrator”run visual studio code application as administrator to fix visual studio code not updating, "failed to install update" or "update failed" error
  2. Now click on Help
  3. Hover over to Check for Updates

install pending visual studio code app updates to fix visual studio code not updating, "failed to install update" or "update failed" error

Then your application will search for updates, downloading and installing them successfully.

2. Repairing Your Visual Studio Code

If restarting your visual studio code does not fix your problem, you can try repairing your application. Often, due to some prior updates clashing with each other, there can be trouble while installing new updates. Apart from this, there are many reasons your existing application files need repairing.

It is, however, important to note that your user settings will be reset, and your existing assemblies will be reinstalled when you repair your application.

You can follow the steps below to repair your Visual Studio Code application:

  1. In the Windows search, type “Visual Studio Installer” or you can alternatively find it at
    C:Program Files (x86)Microsoft Visual StudioInstallervs_installer.exe
  2. Once the installer opens, look for your version of Visual Studio
  3. Click on More and then click on Repair.

After repairing your application, simply launch your Visual Studio Code and try updating it again; hopefully, it will work flawlessly!

report the problem to fix visual studio code not updating, "failed to install update" or "update failed" error

3. Disable Your Antivirus

One of the ways that you can get your application to update is by disabling your antivirus. Often, antivirus softwares tend to stop applications from updating or functioning correctly as the antivirus deems it unsafe to do so. By disabling your antivirus, you might be able to update your Visual Studio Code successfully, but there’s no guarantee that your antivirus might interfere again (after you have enabled it).

It might also delete random files from the installation files. If this is the case, the best course of action can be to change your antivirus and install the antivirus compatible with Visual Studio Code.

4. Ensure Your Visual Studio Code Runs in Administrator Mode

Your Visual Studio Code application would want to update your application in the background. One way to ensure that it is allowed to do this is to ensure it runs in administrator mode. The program not running in administrator mode is one of the reasons why problems with updating the application happen.

Follow the steps below to ensure your Visual Studio Code runs in administrator mode.

  1. Right-click on Visual Studio Code.exe and click on Properties
  2. In Properties, click the Compatibility tab
  3. In the Settings section, click on “Run this program as an administrator”
  4. Save these settings

Now, your application will have complete administrator access and will now be able to update in the background without causing any problems.

5. Delete the Installer Folder

Deleting the installer folder is one of the most common ways users can fix their problems with Visual Studio Code updates. By doing this, the installation metadata is cleared, and the Visual Studio Installer files are reinstalled.

You can follow the following steps to delete the installer folder:

  1. Close your application and Visual Studio Installer if running
  2. Delete the installer folder by finding it at the following address:
    C:Program Files (x86)Microsoft Visual StudioInstaller
  3. After deletion, run the bootstrapper for Visual Studio. You can find the bootstrapper in your Downloads folder: “vs_[Visual Studio edition]__*.exe” or a file that matches this pattern. You can also directly download the bootstrapper from the Visual Studio website.
  4. Now, run and update the Visual Studio Code application

6. Remove All Installation Files

Removing all the installation files is a solution that has to try at the very end because it resets your entire application and makes you reinstall Visual Studio Code. This is a good idea because it eliminates any errors and bugs on your part and will allow you to move to the absolute last stage of the troubleshooting process, i.e., reporting the bug to the developers themselves.

To delete all installation files, first, you will have to uninstall application

  1. Type “Add or Remove Programs” in the Windows search bar
  2. From the list, select Visual Studio 2022 and Microsoft Visual Studio Installer
  3. Click on Uninstall 

remove visual studio code installation files to fix visual studio code not updating, "failed to install update" or "update failed" error

After this, simply download the bootstrapper for Visual Studio Code and run your application.

Conclusion

With the steps highlighted above, you will find that you can fix your Visual Studio Code update issues. The strategies above cover most of the fixes that users worldwide have found to help them the most. If none of these fixes work for you, then you can report the problem to the developers and talk to the Live Chat feature of Microsoft.

I’m a software engineer who has a bright vision and a strong interest in engineering software solutions. Apart from designing and developing business solutions, I’m a content writer who loves to document technical learnings and experiences so that peers in the same industry can also benefit from them.

  • Post author:sajankc
  • Post published:April 18, 2022
  • Post category:IDE
  • Post comments:0 Comments

Here is how you can solve your problem.

Problem: An error occurred while trying to create a file in the destination directory. access is denied.

Solution: Run the update setup file(manual update), with a file name like “CodeSetup-stable-…exe”, which is located at:

C:Users<your_pc_username>AppDataLocalTempvscode-update-user-x64

Tags: error, visual studio code

You Might Also Like

Read more about the article Setting The Default Terminal In VS Code

Setting The Default Terminal In VS Code

February 25, 2022

Read more about the article The Best VSCode Free Dark Themes

The Best VSCode Free Dark Themes

December 14, 2022

Leave a Reply

Comment

Enter your name or username to comment

Enter your email address to comment

Enter your website URL (optional)

Save my name, email, and website in this browser for the next time I comment.

Теги:  visual studio  vs code  Обновлять настройки автоматически  visual studio code  failed to install VS Code upda

Эта подсказка будет появляться каждый раз, когда вы закрываете VS Code, это означает, что обнаруживается обновление, мы изменяем настройку, чтобы не обнаруживать обновления


Шаг 1: Откройте настройки (Файл-> Настройки-> Настройки)

Шаг 2: Введите канал, чтобы открыть файл settings.json

Шаг 3: Измените соответствующий атрибут update.channel на none, и все будет в порядке без обнаружения обновления.


Интеллектуальная рекомендация

JVM Проблема заканчивая

Оглавление 1. Область данных (модель памяти) во время выполнения (модель памяти) (требуется) Дополнительная проблема: Кратко представьте модель памяти Java нестабильное ключевое слово Стратегия распре…

H5-canvas

Холст – очень популярная функция H5.<canvas>Метка устанавливает область на странице, и затем вы можете рисовать графику в этой области. Основное использование Сначала представьте<canvas>, …

Win10 Pure 10 Установлено U Disk Production

Пока это PE, нет чистой версии, потому что сам программное обеспечение PE имеет программное обеспечение производителя. Только U диск, который напрямую делает чистую версию чисто.   Первый метод М…

Тревожные точки знания: Уведомление

Общий метод обработки передачи данных: передача данных слой за слоем сверху вниз. Сценарий: после изменения данных WidgetB WidgetA отвечает соответственно. Решение 1:Справочные точки знаний Flutter Ре…

Вам также может понравиться

Управление дисками и дисковый массив

Сценарий использования дискового массива RAID: отказ жесткого диска Что такое RAID? Несколько общих уровней RAID имеет несколько разных уровней, и каждый уровень реализует различные функции для встрое…

Добавить комментарий