Why is Visual Studio BackgroundDownloader.exe holding a handle to a temporary CMake file?

sc3232 20 Reputation points
2024-01-12T01:28:02.6133333+00:00

In the process of contributing to a Python project (SciPy), I ran into issues with Windows continuous integration builds hosted on GitHub Actions. Specifically, I kept seeing WinError32: The process cannot access the file because it is being used by another process when trying to delete some temporary CMake files. Using Handle.exe, I was able to figure out that the BackgroundDownloader.exe process was responsible for these errors (search this GitHub Actions log for CMakeScratch). Why is this Visual Studio program holding a handle to my temporarily CMake file, preventing me from deleting it? Thanks in advance!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,413 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 30,821 Reputation points Microsoft Vendor
    2024-01-12T03:39:22.7266667+00:00

    Hi @sc3232

    Welcome to Microsoft Q&A! 

    If the Visual Studio is holding a handle to the temporarily CMake file, you can try to close the Visual Studio and delete the file again. 

    As the issue is related to GitHub Actions, you can report it in GitHub Actions community to ask for more information. 

    Thanks for your understanding! 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.