Constantly get The local data store is currently in use by another operation when working on small projects

C#TfsAzure Devops

C# Problem Overview


I use Visual Studio Team Services to store the source code of my projects as I work on them, I love the service, especially that it is free, but I have been running into the biggest pain lately.

Randomly when I go to save, modify, check in check out I get this error for every single file I am modifying. So if I am trying to save changes to 8 files I get this message 8 times and it takes 45 60 seconds of trying to check out for each file meaning to takes 6 - 8 minutes for the errors to stop (even if I hit cancel).

>The local data store is currently in use by another operation

I looked it up online and found many people with the same issue but the response from MS has nothing to do with my situation.

http://blogs.msdn.com/b/phkelley/archive/2013/05/31/tf400030-the-local-data-store-is-currently-in-use-by-another-operation.aspx

It basically says this can happen when you have to many files in your workspace or have several large solution open at once.

This does not apply to me as I usually only have on solution open at a time and my projects are very small (400 -500 files).

C# Solutions


Solution 1 - C#

Ran into this issue as well on VS 2013 and TFS - every time I opened my team explorer it would take 10+ seconds to show all projects, then when I would expand the project in source control, another 10+ seconds would roll by.

Earlier today I began to experience the "local storage is being used" error when trying to save data in class files. I did some original research, and this following link saved the day for sure. Now TFS is blazing!

Local Data Store Solved

What you do is edit workspace (including all projects associated), and change the "Location" dropdown from "Local" to "Server". It took about 4-5 minutes for the changes to finish, but well worth it.

Hopefully this will help someone down the road.

Solution 2 - C#

Lately I started to get same error message and Visual Studio started to work very slow with TFS and nuget. I have tried repair and uninstall but not solve the problem. At the and it was so painfully slow that I cannot continue working. (Expanding one item on source control explorer takes 10 seconds)

Here is my story and how my problem be solved:

I was mapped tfs folders separately not to get whole TFS because there are lots of irrelevant documents. After trying lots of fix suggestion, I thought this might be the problem because I did this separate mapping first time while I have been using TFS. I generally map and get all items at once and never met this issue before.

I removed all mappings and it was like magic. Error is gone, slow TFS source control is gone and it is rocket fast now. Just to be in a safe side I also delete my workspaces and create a new one and get all TFS items at once.

Solution 3 - C#

I found the error would be triggered when I had more than once instance of VS 2012+ running utilizing Source Control Explorer, Solution Explorer and/or Team Explorer windows. I've not had this problem when running a single instance of VS 2012+ (on updates 2+) utilizing Source Control Explorer, Solution Explorer and/or Team Explorer windows in tandem.

I found this article and gave it's suggestion a shot: to prevent multiple threads from accessing the data store simultaneously. http://blogs.msdn.com/b/phkelley/archive/2013/05/31/tf400030-the-local-data-store-is-currently-in-use-by-another-operation.aspx

This proved to be a remedy for this issue.

I would add for other users with large file repositories, using source control and share this issue, it may be greatly beneficial to create multiple workspaces for each of your branches/repositories. I found that by doing this my queries to TFS sped up immensely and also helped with this error. I found this suggestion here: http://blogs.msdn.com/b/phkelley/archive/2013/05/30/using-multiple-workspaces-with-visual-studio.aspx. I share this as users mention TFS running slowly.

Solution 4 - C#

I also started getting the same error this week. Maybe there's something wrong with VS Update 3?
Simply could not work on any of the projects of the "broken" local workspace anymore.
VS would show all files as being checked out, but none were really.
Other local workspaces were working fine.

I tried removing a project from the workspace, but when trying to confirm it, I would receive the same TF400030 error again.

Suggestion
If nothing else works, you might want to try this: simply delete the whole workspace and create it again, this time separating projects into different workspaces. This worked for me.

You'll probably want to back up your files first.

Solution 5 - C#

I did as mentioned below and TFS started working fine

  1. Close all the VS instances
  2. Go to: C:\Users[UserName]\AppData\Local\Microsoft\VisualStudio\15.0_46af8b8e
  3. Delete the privateregistry.bin file
  4. Reopen the project solution

Above worked for me.

Solution 6 - C#

Had the same problem,can be fixed in 3 quick steps:

  1. Remove current Workspace: Source Control Explorer->Work Space ListBox->workspaces... and remove the workspace.

- Make sure that all pending changes are checked in

  1. Delete Workspace local folder.

- Its Better to delete the folder entirely.If eventually keeping some folders make sure to delete all $tf folders (hidden folders inside the workspace folder)

  1. Remap the projects you need ( the less the better )

Hopes that helps.

Solution 7 - C#

In my case the cause was a compressed folder containing my local data store, shown in blue in Windows explorer. Removing the compression did the trick.

Solution 8 - C#

I ran into this error when renaming my workspace. After changing back to original everything worked fine again

Solution 9 - C#

Restarting the Visual studio resolved the issue for me.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionQBM5View Question on Stackoverflow
Solution 1 - C#Rob ScottView Answer on Stackoverflow
Solution 2 - C#Levent SezerView Answer on Stackoverflow
Solution 3 - C#CodeLockedView Answer on Stackoverflow
Solution 4 - C#Caio CamposView Answer on Stackoverflow
Solution 5 - C#Amit ChoudhryView Answer on Stackoverflow
Solution 6 - C#RoyMalkaView Answer on Stackoverflow
Solution 7 - C#Phat PhucView Answer on Stackoverflow
Solution 8 - C#user3838018View Answer on Stackoverflow
Solution 9 - C#Nagaraj RaveendranView Answer on Stackoverflow