Share via


VS2019 making lots of temp folders in AppData\Local\Temp\ and running BackgroundDownload.exe from them

Question

Monday, April 29, 2019 8:42 AM | 6 votes

This is a problem with VS2019 (previous versions didn't do this), it's making many different folders (with random names) in the AppData Temp folder and whenever the PC is idle for a few minutes its running the BackgroundDownload.exe from resources/app/ServiceHub/Services subfolder.

Picture of the search "BackgroundDownload.exe" in the Temp folder:

The problem is:

  1. each of those temp folder is ~160MB in size
  2. I can't create the firewall rule for a program whose path is always changing.

Why is VS creating all these folders and how to prevent it?

All replies (14)

Tuesday, April 30, 2019 10:51 AM ✅Answered | 2 votes

Hi InanZen,

Sorry for the delay in reply.

As far as I know, the temp folder is often used to store temporary files, such as updating, identifying , environment configuration and etc. 

According to your image, it seems that the visual studio auto updates some components background.

Please have a try to close some options about updating in visual studio.

## close the automatically update extension

Extensions >> Manage Extensions

**## close the automatically update visual studio **

Tools >> Options >> Environment >> Product Updates

Any feedback will be expected.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


Thursday, May 9, 2019 7:49 AM ✅Answered

Hi Dylan,

I don't have an Android SDK, the only SDK I have is Monogame SDK.

I do also have Visual Studio Code installed (with some addons) and I noticed it was also set to update in background. I've disabled it and I've disabled the BackgroundDownload task in task scheduler. Hopefully this should resolve my issue.

Regards, Peter


Tuesday, April 30, 2019 12:06 PM

Thank you for the suggestion, I've disabled automatic updates and will post later with the results.

Also I don't understand why or how those BackgroundDownload executables (located in the temp folders) even get launched, since the BackgroundDownload task in Task Scheduler starts the executable located at "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\BackgroundDownload.exe"


Wednesday, May 1, 2019 11:02 AM | 1 vote

Hi InanZen,

Thank you for your reply.

After my research, I find a similar issue which is about the BackgroundDownload.exe running background automatically. And this issue has been escalated for further investigation.

If your issue persists and you also consider your issue is like this issue, you could vote it, then it would attracts more attention.

Sorry for this inconvenience.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


Wednesday, May 1, 2019 1:30 PM

Hi Dylan,

Thank you for all your help.

Your suggestion about turning off the automatic updates resolved my issue.
It looks like the automatic product updates (Tools >> Options >> Environment >> Product Updates) is a new feature in VS2019 and that's why I had no problem with previous versions.


Wednesday, May 8, 2019 7:17 AM

Hi,

So the problem was gone for a week but now it has resurfaced, only this time VS is making temp folder in C:\Windows\temp\ directory.

Othervise it's the same as before: after 5-10min afk I get a firewall notice about BackgroundDownload.exe from a "C:\Windows\Temp\2fe0kele.cx0\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\ folder (where the "2fe0kele.cx0" part is random and changes over time).

Please help me understand why does VS run BackgroundDownload from these temp folders when there is already an instance of it in the static path: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\ ?


Wednesday, May 8, 2019 7:39 AM

I've now disabled the task in task scheduler, however it got re-enabled when I manually updates VS with VSInstaller.

I've now disabled it again and will see for how long this solution will hold..


Wednesday, May 8, 2019 8:47 AM

Hi InanZen,

Could you open this folder which the backgrounddownload.exe locates?

In my side, I could not find the similar folder in the Windows\Temp folder and files in the C:\Users\dylanz\AppData\Local\Temp Folder.

In my opinion, the BackgroundDownload.exe is to install extension and components for visual studio,  And it is is called by one temporary file for VS which is in the "..\Temp\2fe0kele.cx0\.\ folder. So please check if there are related program files in these files, and I will appreciate you could share the screenshot about it with me for further troubleshooting.

Look forward to your reply.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


Wednesday, May 8, 2019 9:35 AM

There are a few such folders, here is a search for phrase:

And here is the summary of one such folder:

As you can see, there are a lot of files (1513 files in 222 subfolders).

And here is the log that shows creation of one of these folders:

[13d8:0001][2019-05-08T09:10:16] UserActivityMonitor started.
[13d8:0001][2019-05-08T09:10:16] Telemetry property VS.SetupEngine.ActivityId : 9173a6a1-d579-4db9-a945-d3574d7e6bfd
[13d8:0001][2019-05-08T09:10:16] Telemetry property VS.SetupEngine.IsChildProcess : False
[13d8:0001][2019-05-08T09:10:16] Telemetry property VS.SetupEngine.IsNoCancel : True
[13d8:0001][2019-05-08T09:10:16] BEGIN: Background Download
[13d8:0001][2019-05-08T09:10:16] Running pre-check verification.
[13d8:0001][2019-05-08T09:10:16] BEGIN: Check for updates
[13d8:0004][2019-05-08T09:10:16] Telemetry property VS.SetupEngine.ChannelUpdateDisabled : False
[13d8:0008][2019-05-08T09:10:17] Download requested: https://aka.ms/vs/15/release/channel
[13d8:0010][2019-05-08T09:10:17] Download requested: https://aka.ms/vs/16/pre/channel
[13d8:0005][2019-05-08T09:10:17] Download requested: https://aka.ms/vs/16/release/channel
[13d8:001a][2019-05-08T09:10:17] Attempting download 'https://aka.ms/vs/15/release/channel' using engine 'WebClient'
[13d8:001c][2019-05-08T09:10:17] Attempting download 'https://aka.ms/vs/16/pre/channel' using engine 'WebClient'
[13d8:001b][2019-05-08T09:10:17] Attempting download 'https://aka.ms/vs/16/release/channel' using engine 'WebClient'
[13d8:001b][2019-05-08T09:10:17] Uri 'https://aka.ms/vs/16/release/channel' redirected to 'https://download.visualstudio.microsoft.com/download/pr/bbd9341f-3eea-459e-aa9f-a1d4903746be/5d4cdf4914cc00224dca8140be80a352/visualstudio.16.release.chman'
[13d8:001a][2019-05-08T09:10:17] Uri 'https://aka.ms/vs/15/release/channel' redirected to 'https://download.visualstudio.microsoft.com/download/pr/9f40dfe7-94b4-4f34-942d-34256ef300e0/cdd8832fc74835f3b66c514455ee58cc/visualstudio.15.release.chman'
[13d8:001c][2019-05-08T09:10:17] Uri 'https://aka.ms/vs/16/pre/channel' redirected to 'https://download.visualstudio.microsoft.com/download/pr/04561ca2-1d99-4405-958a-7705eb094800/e62ccabb09778f25aec85ebc9448f851/visualstudio.16.preview.chman'
[13d8:001a][2019-05-08T09:10:17] ManifestVerifier Result: Success
[13d8:001c][2019-05-08T09:10:17] ManifestVerifier Result: Success
[13d8:001b][2019-05-08T09:10:17] ManifestVerifier Result: Success
[13d8:001a][2019-05-08T09:10:17] Download of 'https://aka.ms/vs/15/release/channel' succeeded using engine 'WebClient'
[13d8:001b][2019-05-08T09:10:17] Download of 'https://aka.ms/vs/16/release/channel' succeeded using engine 'WebClient'
[13d8:001c][2019-05-08T09:10:17] Download of 'https://aka.ms/vs/16/pre/channel' succeeded using engine 'WebClient'
[13d8:0006][2019-05-08T09:10:17] Channel manifest for https://aka.ms/vs/15/release/channel is already up to date.
[13d8:000e][2019-05-08T09:10:17] Channel manifest for https://aka.ms/vs/16/release/channel is already up to date.
[13d8:0005][2019-05-08T09:10:17] Channel manifest for https://aka.ms/vs/16/pre/channel is already up to date.
[13d8:000e][2019-05-08T09:10:17] Checking if catalog is in sync with channel manifest for https://aka.ms/vs/16/release/channel.
[13d8:0006][2019-05-08T09:10:17] Checking if catalog is in sync with channel manifest for https://aka.ms/vs/15/release/channel.
[13d8:0005][2019-05-08T09:10:17] Checking if catalog is in sync with channel manifest for https://aka.ms/vs/16/pre/channel.
[13d8:0005][2019-05-08T09:10:19] Downloading installable manifest from "https://download.visualstudio.microsoft.com/download/pr/04f11ac6-3b62-4174-9501-d6200e516dfa/793e58a8966adc10696443cb019b9091/visualstudiopreview.vsman" and using the channel URI "https://aka.ms/vs/16/pre/channel".
[13d8:0005][2019-05-08T09:10:19] Download requested: https://download.visualstudio.microsoft.com/download/pr/04f11ac6-3b62-4174-9501-d6200e516dfa/793e58a8966adc10696443cb019b9091/visualstudiopreview.vsman
[13d8:001a][2019-05-08T09:10:19] Attempting download 'https://download.visualstudio.microsoft.com/download/pr/04f11ac6-3b62-4174-9501-d6200e516dfa/793e58a8966adc10696443cb019b9091/visualstudiopreview.vsman' using engine 'WebClient'
[13d8:001a][2019-05-08T09:10:20] ManifestVerifier Result: Success
[13d8:001a][2019-05-08T09:10:20] Download of 'https://download.visualstudio.microsoft.com/download/pr/04f11ac6-3b62-4174-9501-d6200e516dfa/793e58a8966adc10696443cb019b9091/visualstudiopreview.vsman' succeeded using engine 'WebClient'
[13d8:0001][2019-05-08T09:10:20] No new manifest downloaded for instance: 400ff4b2
[13d8:0001][2019-05-08T09:10:20] No restart manager available. Assuming no reboot required for instance state.
[13d8:0001][2019-05-08T09:10:20] The cache manifest and downloaded manifest had the same version for instance: c5cdecf6. Did not compute update information.
[13d8:0001][2019-05-08T09:10:20] No restart manager available. Assuming no reboot required for instance state.
[13d8:0001][2019-05-08T09:10:20] END: Check for updates
[13d8:0001][2019-05-08T09:10:20] BEGIN: Launch child and wait
[13d8:0005][2019-05-08T09:10:20] Newer bootstrapper cached: C:\Windows\TEMP\VS\Setup\3b65be0a-98e9-4c4d-82b0-4d609c7ec059\vs_setup_bootstrapper.exe, version: 2.1.2105.426
[13d8:0001][2019-05-08T09:10:26] Package signature verification returned Success for path: C:\Windows\TEMP\VS\Setup\3b65be0a-98e9-4c4d-82b0-4d609c7ec059\vs_installer.opc
[13d8:0001][2019-05-08T09:10:26] Extracting 'C:\Windows\TEMP\VS\Setup\3b65be0a-98e9-4c4d-82b0-4d609c7ec059\vs_installer.opc' to 'C:\Windows\TEMP\2fe0kele.cx0'.
[13d8:0001][2019-05-08T09:10:31] Successfully extracted 'C:\Windows\TEMP\2fe0kele.cx0'.
[13d8:0001][2019-05-08T09:10:31] Child process started: C:\Windows\TEMP\2fe0kele.cx0\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\BackgroundDownload.exe
[13d8:0001][2019-05-08T09:10:31] Waiting for setup process to complete...
[13d8:0001][2019-05-08T09:12:30] Child process exited with code 0
[13d8:0001][2019-05-08T09:12:33] END: Launch child and wait
[13d8:0001][2019-05-08T09:12:33] END: Background Download

Thursday, May 9, 2019 6:09 AM

Hi InanZen,

Did you use other third-party Android SDK or packages for visual studio?

According to the log, I download one link "https://../visualstudiopreview.vsman" then open the file as notepad. 

After reading, I find it is related to installation and environment configuration of Android SDK. Then I download one link from the file, then the build tools which is for android is downloaded.

If so, please try to close "Automatically update.." from my first reply.

Any feedback will be expected.

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


Friday, July 12, 2019 6:36 PM | 2 votes

I tried turning off the auto-updates in Visual Studio but I kept getting this thing. Then I found it in Task Scheduler (below). Here's hoping this thing is finally dead and gone! Will report back either way once I confirm.


Friday, August 2, 2019 5:07 PM | 2 votes

Yes that's what I did (see a post above yours) and it is ok now.


Wednesday, December 4, 2019 6:14 AM | 1 vote

I cannot even begin to describe how dangerously incompetent having something in a temp folder with a rolling name download material from the internet is.  As you cite, this makes it all but impossible to whitelist this access.  It's clear whoever developed this feature _wasn't even using a real firewall_, which is even more alarming.

Seeing this in a half-ass third-party calculator app would be infuriating.

Seeing it in Visual Studio... I mean, sometimes I really think something has literally gone wrong with the water pipes up there.  This is pathetic.


Thursday, March 19, 2020 7:49 PM

Thank you, EM3R50N. This was driving me mad.