Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 will not save/overwrite read only files

So, up until I installed VS2012, when I tried to edit a read only file in VS2010, a dialog popped up giving me three options when I pressed Save:

  • Edit in memory
  • Make writable
  • Save a copy

Suddenly, it has stopped offering these options. Is there a way to put it back without popping up the save dialog every time and then telling me the file is read only.

I think this maybe source control related but the projects I'm using is not bound within the IDE to source control, just that the file is in source control

like image 367
Jon Avatar asked Sep 19 '12 14:09

Jon


People also ask

How do I get out of read only in Visual Studio?

Go to Tools | Options | Environment | Documents and uncheck the option called "Allow editing of read-only files; warn when attempt to save." Now, when you start to make changes a read only file you'll get that dialog box asking if you want to create a new file, make the file writeable, or cancel.

How to change read only file vscode?

In Windows: Open file in explorer, hit >Properties > Read only. Done.


2 Answers

Rather than hack the registry I simply selected "None" in the Tools>>Options>>Source Control>>Plug-in Selection.

like image 60
TheArtTrooper Avatar answered Sep 19 '22 13:09

TheArtTrooper


I recently had the same problem with Visual Studio 2013. I solved the problem by editing the registry:

  • Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\SourceControlProviders
  • Remove the key dealing with GitSccProvider

Not sure why this works. I figured it may have something to do with source-control integration given this persons post at: http://social.msdn.microsoft.com/Forums/vstudio/en-US/4e4c1878-3901-425e-a454-2c0d628275b0/when-saving-a-modified-readonly-file-it-always-pops-up-save-as-dialog?forum=vseditor where he solved the problem by disabling a Mercurial plugin.

like image 32
stonea Avatar answered Sep 22 '22 13:09

stonea