Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My project in Visual Studio is Read Only. What did I do?

I must have done something wrong. I have a C# project in Visual Studio 2008. All of a sudden I see a lock on my classes and when I hover the class names on the top tab I see the class name as : C:\Myprojects\Oder.cs[Read Only] !

Has something weird like that happened to you before?

like image 411
Bernard Larouche Avatar asked Apr 05 '10 20:04

Bernard Larouche


People also ask

How do I show a project in Visual Studio?

Open Visual Studio. On the start window, select Clone a repository. In the Browse a repository section, select Azure DevOps. Follow the prompts to clone an Azure DevOps repo that includes the files you're looking for, and then open your project.

How do I open Visual Studio project settings?

In Visual Studio, you can access project settings by right-clciking the projects node in Solution Explorer, and choosing "Properties" from the context menu (not to be confused with the "Properties" folder that is in some Elements projects).

How do I see all projects in Visual Studio?

Visual Studio 17.2 Preview 3 introduces a brand-new All-In-One search experience that merges the existing VS Search (Ctrl + Q) and Go To (Ctrl + T) to allow you to search both your code and Visual Studio features quicker and easier than ever, all in the same place.


2 Answers

In my case it was a ReSharper 9.0/9.1 related issue. After clearing the ReSharper cache, I was able to edit files in my solution again.

Clearing the ReSharper cache can be done here: ReSharper -> Options -> Environment -> General and click: Clear Caches and restart your visual studio.

Clearing the ReSharper cache

(The image is contained within the first of the linked JetBrains articles).

JetBrains instructions:

Ultimate Guide to Speeding Up ReSharper (and Visual Studio) - Performance degradation after ReSharper upgrade

ReSharper Online Documentation

like image 128
Lasse Christiansen Avatar answered Oct 11 '22 14:10

Lasse Christiansen


A couple of possibilities spring to mind:

Have you added the project to source control?

Have you marked the project folder (and all it's sub folders) as read only?

Of course, someone else may have done either of these things if they have had access to your machine.

like image 20
ChrisF Avatar answered Oct 11 '22 15:10

ChrisF