maxspan
maxspan

Reputation: 14177

Cannot open Visual Studio - throw error 'cannot run when setup is in progress'

I am trying to open Visual Studio, but it is giving an error:

cannot run when set up is in progress

It was running fine before when I restarted my machine. I have already installed this version from past one year.

screenshot

Upvotes: 264

Views: 161206

Answers (30)

KumarHarsh
KumarHarsh

Reputation: 5094

Apart from so many suggestion in this post.

In my case setup.exe (with visual studio icon) was also running in background ,I killed that

Task Manager --> Detail-- setup.exe(with visual studio icon) -->EndTask

Upvotes: 0

Muhammad Rizwan
Muhammad Rizwan

Reputation: 1

Issue: This issue occurred due to shutting down the laptop without properly closing Visual Studio.

Fix:

  1. Open Task Manager and navigate to the Background Processes section.
  2. Look for any Visual Studio-related instances that are still running.
  3. If you find any, select them and click End Task.
  4. Reopen Visual Studio.

Upvotes: 0

Dewey Vozel
Dewey Vozel

Reputation: 2423

I had this problem with Visual Studio 2017. There were processes in Task Manager named VSIXAutoUpdate.exe. I watched Task Manager and they were spawning and despawning. A few times, a Visual Studio 2017 process would spawn and despawn.

After VSIX Auto Updater stopped showing up in Task Manager, it had applied all of it's background updates and I was able to launch Visual Studio.

I wouldn't recommend killing these processes in the middle of them installing updates, like other answers to this question suggest. Just wait until they finish by watching Task Manager.

If it is taking a long time (see comments, most users wait ~5-10 minutes), consider if VPN or firewalls are interfering with the internet connection.

Upvotes: 146

Manoj T V
Manoj T V

Reputation: 1

In my case, I am using 2019 version.

I think the installation is going on in the background. It opens after a while. If there is a missing package by looking through the Installer, you can try to install it as well.

Upvotes: 0

George Botros
George Botros

Reputation: 4399

Try to check Task Manager and kill any process related to Visual Studio (any version).

Update:
as many people mentioned in the comments it could be better to wait a while until those processes end themselves

Upvotes: 194

Ali Mumtaz
Ali Mumtaz

Reputation: 155

Press Win+R and type %temp% then delete all files, and restart Visual studio. enter image description here

Check "Do this for all items" and press Skip button if required.

Upvotes: 2

user9616761
user9616761

Reputation: 21

I have opened visual studio installer, clicked Modify, and launched the Visual Studio . It solved the issue.

Upvotes: 2

Tereza Tomcova
Tereza Tomcova

Reputation: 5088

Not exactly an answer to the original question, but if you really need to run VS during setup, you can use the undocumented /AllowDuringSetup command line switch (at your own risk).

Upvotes: 62

Anh Bui
Anh Bui

Reputation: 41

Process hacker

It is Extension auto-update processing is running. You can either kill them or wait until they finished (recommended)

Upvotes: 1

Qing
Qing

Reputation: 31

enter image description here Open the Task manager, there is a service named VSStandardCollectorService150 service, right-click to start it. This is worked for me for the same issue on VS2019.

Upvotes: 3

stephan limberg
stephan limberg

Reputation: 51

A pending Windows update was the cause. After the Windows update Visual Studio starts without any problems.

Upvotes: 5

Yashas Gowda
Yashas Gowda

Reputation: 31

  • Give some time and try again.
  • End all the tasks related to visual studio in task manager.
  • If both of these solutions doesn't work then restart the machine it'll definitely work.

Upvotes: 3

Abdus Salam Azad
Abdus Salam Azad

Reputation: 5512

On task manager, kill "Visual Studio Installer". This worked for me

Upvotes: 1

Solution: Do not just open up Task Manager and Kill all processes that VSXAutoUpdate.exe is updating, this will give you problems when you try to start Visual Studio as updates were not complete. Instead, Wait until the update completes that is when you start the Visual Studio. If you no longer need the Visual Studio Component that is updating more regularly, again it is advised to uninstall the component via Visual Studio Installer

Upvotes: 11

Preeti
Preeti

Reputation: 501

In my case Visual Studio got closed automatically itself without asking any confirmation or showing warning.

Don't stop the process. Wait for 5 or 10 minutes. Visual studio will automatically start itself.

Upvotes: 0

Thina
Thina

Reputation: 11

Just restart the system,Its worked for me.

Upvotes: 1

aj_shehan
aj_shehan

Reputation: 122

In my case the "vs_installershell.exe" for visual studio was still running when I checked from the task manager. After I ended the process visual studio 2019 opened normal.

Upvotes: 1

bdrajer
bdrajer

Reputation: 742

Instead of killing VSIXAutoUpdate.exe, you should be able to prevent it from starting as it seems to be run by the task scheduler. Go to the Microsoft/VisualStudio folder in the scheduler and you will see one or more tasks called VSIX Auto Update (I guess there's one for each VS version installed). Right click and disable... You'll probably lose the ability for VS extensions to get automatically updated, though - hopefully nothing more than that.

Upvotes: 2

Baqer Naqvi
Baqer Naqvi

Reputation: 6514

It happended to me, I restarted the system but made no difference. Went to Task Manager and there was a task VSIXAutoUpdate.exe running. I could have just killed it, but I waited for like 10 minutes and tried again opening the Visual Studio and it worked. Now you know what to do!

Upvotes: 5

Pabitra Kumar Chhatai
Pabitra Kumar Chhatai

Reputation: 61

Open Task manager and stop the Visual Studio Process.

Clear out %temp% folder, and re-started VS2019.

This worked for me.

Upvotes: 5

Hugo Nava Kopp
Hugo Nava Kopp

Reputation: 3064

In my case, I opened Visual Studio Installer and saw that it said

Set up failed. Click retry to continue.

Once I reinstalled the problem went away.

Upvotes: 0

noobmaster007
noobmaster007

Reputation: 163

Clearing the %temp% folder worked for me for the same issue on VS2019.

Upvotes: 2

fingers10
fingers10

Reputation: 7977

I was facing the same issue when opening Microsoft Visual Studio Enterprise 2019 Version 16.4.2 inside my VM.

Here is the solution and this is what I did and it worked for me:

Don't kill any process related to Visual Studio in Task Manager as it may end in unexpected behavior and even make you to reinstall Visual Studio sometimes. So Simply wait for 5 to 10 minutes. All the process related to Visual Studio will end automatically.

Now open your visual studio it will work normally.

Upvotes: 2

ramya
ramya

Reputation: 2780

I cleared out my %temp% folder, and re-started VS2017. started working fine.

Upvotes: 2

Teo
Teo

Reputation: 340

I started Windows Installer service from the windows task manager then the Visual Studio 2019 opened (solution suggested here and worked for me)

Upvotes: 1

Ray Goudie
Ray Goudie

Reputation: 176

You can also just launch Visual Studio Installer. The installer seems to fix whatever is the background issue. You can then just launch your Visual Studio from the installer.

I just now resolved my issue this way.

Upvotes: 1

crag
crag

Reputation: 399

I encountered this error today after a cold boot (on a VM) and found a solution.

  • Windows > Services
  • Look for a service with a name like 'Visual Studio Standard Collector Service'
  • Right click on the item and start the service => Visual Studio should now be able to launch

To prevent this from happening the next time you reboot (at least until there is an update that re-introduces the bug) you can:

  • Right click on the item and select Properties
  • Set the Startup type to 'Automatic'
  • Select Apply

Found using: VS Community 2019, Version 16.1.3

Upvotes: 29

Jai
Jai

Reputation: 61

Go to task manager and end the VS Auto Update task. It will work fine.

Upvotes: 6

HumbleBeginnings
HumbleBeginnings

Reputation: 1019

What I found on Task Manager was that a VS Preview 2019 version was updating while I was trying to start my production version of VS2017. Never had the problem before. I waited, as many others suggest, about 3 minutes and the problem subsided with not consequential repercussions. Felt a LOT better that way rather than nuking a task through Task Manager. :-)

Upvotes: 2

Chandramouli
Chandramouli

Reputation: 422

Root Cause: If, We shutdown the system with out closing the visual studio properly and next time we will open the system then some times we will get this issue due to setup will run at background.

Fix: No need to do any thing just wait for 10 to 15 minutes and open the visual studio again. It will automatically fix the issue.

Upvotes: 32

Related Questions