views:

1933

answers:

3

So, up until today, when I tried to edit a read only file in VS2008, a dialog popped up giving me three options:

  • Edit in memory
  • Make writable
  • Save a copy

There was also a checkbox which read "Never allow in memory edits".

Suddenly, it has stopped offering these options and simply will not accept any input in the editor window if the file is read only. I have to go into windows explorer and mark the file as not read only then reopen it in VS before I can make any changes. I'm working on a large project, with lots of source controlled files and often need to make local only changes to files, so this is a real PITA.

I'm guessing I must have checked the never allow in memory edits checkbox by mistake.

There is an option in Tools.. Options.. Documents which reads:

"Allow editing of read only files, warn when attempt to save"

This checkbox is ticked, and changing its value currently as no effect. I've tried closing and opening studio, restarting my machine etc - all to no avail.

Anyone know how to restore the previous behaviour?

A: 

Actually, the most logical thing to do is this:

  1. If A file is not intended to be edited, mark it read only
  2. If A file is intended to be edited, mark it writable!

This is in part the whole point of the read only attribute.

If you think I am somehow wrong, sure, down mod me, but everyone else logically should agree with me, because presently, its not overly clear why it is you have the need to use things the wrong way.

Until the explanation is expanded upon, your problem is on par with complaining why, when you delete something, you can't later get it back.

Kent Fredric
some silly version control systems mark the file as read only or sometimes when files are copied to a machine from another source the attributes are brought over - and not explicitly set by the user... I for one think the SourceSafe model of write protecting a file is nonsense.
Tim
I shouldn't have to flip a bit or check out a file to modify it. Only hen I commit should I need to be aware of changes.
Tim
You're missing the point. I'm not looking to be re-educated on how to use my text editor, I'm wondering if there is any way to restore the behaviour that existed yesterday, where I could make local changes without having to switch applications. Thanks though, for your insight.
Winston Smith
+8  A: 

In case anyone is interested, resetting the following registry entry to 0 will restore the previous behaviour:

HKCU\Sofware\Microsoft\Visual Studio\9.0\Source Control\UncontrolledInMemoryEditDialogSuppressed
Winston Smith
Do you want someone (a.k.a. me) to echo this answer so you can mark your question as answered?
flipdoubt
+1  A: 

I did the same thing in Visual Studio 2010. The dialog box is not completely clear in the wording. The problem (and Winston's solution) is the same in Visual Studio 2010. So set this to 0 in the registry:

HKEY_CURRENT_USER\Software\Microsoft\Visual Studio\10.0\Source Control\UncontrolledInMemoryEditDialogSuppressed

huttelihut