TFS 2010 – Deleting a folder in Visual Studio solution before check-in of changes

We are using TFS 2010 and facing a problem with deleting a folder inside of a solution in Visual Studio.

In the latest version of checked-in code, the directory in question has files in it.

  • TFS 2010 - command line for convert to branch
  • TFS, windows authentication and commandline git (msysgit)
  • It is possible to get TFS change set number from the local file system?
  • How do I move TFS 2013 code to a new local working folder after upgrading solution to VS 2015?
  • Multiperson team using NuGet and Source Control
  • SVN vs. Team Foundation Server
  • One of the developers decided to move the files in that directory to another location within the solution. He then tried to delete the old folder but go the following error:

    This operation cannot be completed. 
    You are attempting to remove or delete a source-controlled item where the item is either exclusively locked elsewhere or otherwise unable to be deleted from source control.

    Does anyone know what the problem is with trying to do this and is there a way to get around it?

  • How can I allow only certain people to commit in Visual Studio Online?
  • TFS Branch refused to go
  • Git in Visual Studio Team Services, Visual Studio 2012 Project - can't deploy from build
  • Visual Studio 2015 and Git/TFS: Sync-Page-Error: Object not found - no matching loose object
  • Visual Studio using TFS GIT error when connecting
  • VisualStudio: An error was raised by libgit2. Category = Checkout
  • 2 Solutions collect form web for “TFS 2010 – Deleting a folder in Visual Studio solution before check-in of changes”

    You cannot delete a folder that has pending changes on any of its children (including if any of those children are being moved out of the folder – they’re still children until that changeset is checked in.)

    You’ll have to do this in two steps: first, move the children out of the folder and check those changes in, then delete the folder as a separate changeset.

    If the folder you want to delete exists on your local machine, just add a new file to the folder from within the Visual Studio IDE (it doesn’t matter what type of file). Then you should be able to delete the folder from within VS.

    If the folder was deleted from your local machine, create a new one with the same name and then follow the above steps.

    Git Baby is a git and github fan, let's start git clone.