Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot edit checked out file (TFS) in Visual Studio 2013

Since I changed my windows password I can no longer type into a checked out file in Visual Studio 2013! Where before I just needed to start typing and it would check out the file in the background, now it won't even allow me to type into the file after I manually check the file out, from the solution explorer! It's as if VS 2013 is ignoring the keyboard on the project under source control. It's fine for other projects even project's under source control!

I think I remember seeing this before with older versions of Visual Studio and resolved it with a "Go online" option but I can't see that option in VS 2013, or the project is not "off line" so the option is not available.

This is obviously related to the TFS setting on the project but I simply cannot get past it. I am blocked and would appreciate any suggestions.

like image 978
Seamus Barrett Avatar asked Aug 07 '14 08:08

Seamus Barrett


People also ask

What is Checkout for edit in TFS?

In rare situations (for example, you want to check out and lock the file to make sure your changes are checked in before changes from other team members), you might need to manually (right click -> check out for edit) check out (and optionally lock) an item.

How do I checkout code in TFS?

Right-click your project or project suite in the Project Explorer and then click Source Control > Check Out for Edit.

How do I undo a checkout in TFS?

Right-Click In the File List, right-click the files you want to undo and select Source Control > Undo Check Out (for selected files) or Source Control > Project > Undo Check Out All (for all files in the project).


2 Answers

I suspended Resharper and restarted Visual Studio 2013. Once I reopened it the problem was gone. Resuming Resharper caused the problem to emerge again.

The solution is quite large so maybe that is it. Before putting Resharper into suspend mode I tried switching off code analysis thinking the workload is just too great, but that didn't help. The suspend did though. I hope this helps anyone else with the same issue.

All I have to do now is to figure out how to get Resharper back in the game without the problem coming back. We rely on Resharper as it is an wonderful tool. Since the solution has many projects in it, I am going to try create a smaller solution with my web project and just reference the other projects as assemblies. Maybe that will help

Update: Clearing the resharper cache as suggested by Alexander resolved the original issue.

like image 151
Seamus Barrett Avatar answered Sep 30 '22 05:09

Seamus Barrett


I'd like to add Alexander's comment as answer, since it helped me exactly to solve the issue:


Clean R# (ReSharper) caches by deleting all folders (and files) from the path

C:\Users\{User Name}\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches\

and then reopen the solution.


Note: (Thanks to Antak for providing this info!)

You can paste

%userprofile%\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches

into file explorer's path textbox (open it via Win+E, or use Win+R and paste the path into the command window), this will resolve the physical path into your user's directory automatically.

like image 29
Matt Avatar answered Sep 30 '22 04:09

Matt