How to reset the "Don't show this dialog again" settings for Visual Studio and ReSharper
Asked Answered
I

2

15

In a Visual Studio project (C#), I attempted to perform a rename of a namespace using the ReSharper shortcut (Ctrl + R + R). However, because I had branched some of the files that used the namespace from another location in the source control system, they had the readonly attribute set on them. Consequently, I received a dialog which contained "Sorry, apparently I can't post an image because I'm a new user":

The file TestFile.cs which you attempted to edit, is readonly on disk. Would you like to make the file writeable or edit it anyway?

Checkbox: Don't show this dialog again (Never allow in memory edits)

Buttons: Edit In-Memory, Make Writeable, Cancel, Help

I ticked the "don't show this dialog again" checkbox and clicked Make Writeable.

To me, that suggests that in the future, all readonly files which you attempt to edit would automatically be made writeable. Instead, what has actually happened is that all future attempts to edit a readonly file are automatically cancelled (without the dialog box being shown)!

Therefore, I need to reset the settings which control whether this dialog is displayed. I'm not sure if it's a Visual Studio setting, or a ReSharper setting, but I have tried resetting the Visual Studio Options (from menu Tools -> Import and Export Settings menu item) to no avail. I can't find any way to reset the ReSharper settings.

Software versions:

  • Visual Studio 2008 Service Pack 1
  • ReSharper 4.5
Incantatory answered 24/2, 2010 at 2:39 Comment(1)
It's 2015, and I just got suckered by this option, too. May I suggest that you change your answer credit to reward @JohnZabroski's answer, which actually is an answer, as opposed to the currently accepted answer, which just restates the problem?Celie
H
5

I was able to reproduce this. This appears to be an error with the Resharper 4.5 plug-in. VS 2008's /Tools/Options/Documents has a checkbox for Allow editing of read-only files; warn when attempt to save. This had no effect, after I took this steps you outlined.

What I noticed at first is that I was not able to edit a read-only file after clicking these buttons you mentioned. I was able to indirectly edit a read-only, through refactor/rename, after I went to Resharper Options/General and checked Always show error dialog when exception occurs.

I have reported this as a bug to Jet Brains.

Hotspur answered 25/2, 2010 at 4:42 Comment(0)
E
17

I ran into this issue today.

Run my one-line PowerShell script, which automates JetBrains' solution.

Set-ItemProperty Hkcu:\Software\Microsoft\VisualStudio\10.0\SourceControl\ -Name UncontrolledInMemoryEditDialogSuppressed -Value 0
Eve answered 6/6, 2012 at 14:23 Comment(2)
note that the version number (.. VisualStudio\ 10.0 \SourceControl ..) is specific to VS 2010. Make sure update it accordingly if you have other VS versionSuicidal
Also note that starting with Visual Studio 2017, each install uses its own private registry hive.Counterintelligence
H
5

I was able to reproduce this. This appears to be an error with the Resharper 4.5 plug-in. VS 2008's /Tools/Options/Documents has a checkbox for Allow editing of read-only files; warn when attempt to save. This had no effect, after I took this steps you outlined.

What I noticed at first is that I was not able to edit a read-only file after clicking these buttons you mentioned. I was able to indirectly edit a read-only, through refactor/rename, after I went to Resharper Options/General and checked Always show error dialog when exception occurs.

I have reported this as a bug to Jet Brains.

Hotspur answered 25/2, 2010 at 4:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.