Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 315
Teevus Avatar asked Feb 24 '10 02:02

Teevus


2 Answers

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
like image 195
John Zabroski Avatar answered Sep 27 '22 21:09

John Zabroski


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.

like image 41
Blanthor Avatar answered Sep 27 '22 19:09

Blanthor