crazyTech
crazyTech

Reputation: 1477

Need TFS to just take my lock for files away

Here is the information about the development environment pertaining to my work computer:

Microsoft Visual Studio Enterprise 2015

I checked out some projects from our company's TFS server. I go the lock for the various solution files (.sln), however, it prevents other programmers from committing code.

I right-clicked on the solution file (.sln), and clicked "Undo Pending Changes..." because I thought the aforementioned steps would release the lock.

However, I get the following warning for a bunch of files within the solution folder:

The item 'blahblah.cs' is already under source control at the selected location. If you are trying to rebind a project that you have already added to source control outside Microsoft Visual Studio, you should use the Change Source Control command. If you are adding this project for the first time, you should either choose a different server folder for the project or move the existing project to a different server folder.

-Why is the said message assuming that I'm trying to rebind the project that's already in source control?

-In any case, I just want to release the lock, how do I go about releasing the lock?

Upvotes: 0

Views: 295

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51093

To unlock a folder or file from Source Control Explorer

1.On the View *menu, choose *Other Windows,and then choose Source Control Explorer.

2.In Source Control Explorer, open the shortcut menu for the folder or file from which you want to remove a lock, and then choose Unlock.

Note: If you haven't check the lock status under Pending Changes, you need to check in the pending changes first. More detailed info from MSDN: Lock and unlock folders or files

You can also use tfs lock command to unlock files or folders such as c:\projects>tf lock /lock:none src/

Upvotes: 1

Related Questions