Cannot Save File message keeps popping up in Visual Studio 2022

Trevor 0 Reputation points
2025-06-25T07:22:19.02+00:00

While making changes to an MFC dialog using the resource editor, and then not making changes for a short while, Visual Studio 2022 keeps popping up a 'Cannot save file' message...

User's image

It's as though it is trying to write away a temporary file somewhere, but is being prevented. I can still make manual saves normally.

Our IT department cannot see what might be causing these messages, and have given the 'devenv' executable privileges to do what it needs to.

What file is it trying to save, and where?

Developer technologies C++
{count} votes

2 answers

Sort by: Most helpful
  1. David Lowndes 2,640 Reputation points MVP
    2025-06-25T10:18:16.66+00:00

    Using the SysInternals Process Monitor, it appears to correspond to a CreateFile NAME NOT FOUND failure in the project's backup directory:
    C:\Users\YOURNAME\AppData\Local\Microsoft\VisualStudio\BackupFiles\YOUR_PROJECT_NAME~AutoRecover.YOUR_PROJECT_NAME.rc

    Around the same time there are also QueryDirectory failures in the same directory with resource.h & resource.hm - the latter being suspicious because I no longer have the old WinHelp in the project.
    On further checking, some of my dialogs still had the Help ID property set for some controls. Changing those to false no longer generates the resource.hm file, and the problem has stopped, and I note that the Git Changes pane no longer shows my .rc file with a * when I make a change to a dialog that hasn't been saved (which it used to do with the help IDs set true).

    2 people found this answer helpful.
    0 comments No comments

  2. Michael Taylor 60,161 Reputation points
    2025-06-25T17:42:27.8766667+00:00

    I would recommend you report the issue to the VS team directly by using the Send Feedback option in VS. That will allow MS to get information about your VS instance and extensions and you can provide repro steps for them to replicate the issue.

    0 comments No comments

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.