How to suppress "Edit Of Read-Only File" popup on vs2022

Pierre-Olivier Rioux 1 Reputation point
2022-11-09T15:54:03.753+00:00

On past visual studio version (VS2019) attempting to change a read only file would play a sound and nothing else (Great!).
Now it always ask what i want to do even i want to cancel 100% of the time (Bad!).

How can i get this behavior ?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,637 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
    2022-11-10T08:49:20.563+00:00

    Hi @Pierre-Olivier Rioux ,

    Welcome to Microsoft Q&A forum.

    I tested in VS 2017, VS 2019 and VS 2022. Like David said, the "Allow editing of read-only files; warn when attempting to save" option controls whether this "Edit Of Read-Only File" dialog pops up at the beginning of editing the read-only file, or pops up after you have changed the read-only file and prepare to save the changes. But in both situations this dialog will pop up, it’s just the order.

    According to your description, it seems that on past, VS 2019 didn’t pop up this dialog? I cannot confirm this, but if it is true, I would recommend raising a suggestion ticket on our Developer Community.

    BTW, for read-only file, there's a lock icon on the tab. If Tools > Options > Source Control > Plug-in Selection > Current source control plug-in is set to like Git(not None), then another dialog will pop up when editing read-only files.

    Best Regards,
    Tianyu

    • 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.
    0 comments No comments

  2. Pierre-Olivier Rioux 1 Reputation point
    2022-11-11T13:46:49.897+00:00