2

I have a Visual installer project on TFS, recently I switched to TFS git but when I try to update version or any other update it say the command you are attempting cannot be completed because the file is under source control, I used to get the same problem on TFS and fixed with Check Out for Edit. How to Check Out for the edit on TFS git? I am using vs Enterprise 2017, Please help me.

Mohammed Zayan
  • 859
  • 11
  • 20
Aasish
  • 377
  • 5
  • 18

4 Answers4

8

If you use GIT and can't "check out" try the following workaround, maybe it can help:

  • Choose 'Open file in File explorer' in your context menu

  • Open the project file in your favorite texteditor

  • Make a dummy change (adding a space character in an empty spot is enough), Visual studio will prompt to reload the project and has explicity checked out the project file.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
  • This is a good answer to use in VS2019 if you're using Git, but you've inherited an old project which has some kind of SourceSafe remnant in it – Lorraine Dec 21 '21 at 15:06
3

I had the same issue with Visual Studio 2019 and TFS.

I solved it by closing and opening Visual Studio...

Esteban Verbel
  • 738
  • 2
  • 20
  • 39
0

You can't check out files in Git. That's not how Git works. You need to unbind the TFVC bindings for the solution.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
0

Open your .vdproj file in Team Explorer window => Source Control Explorer. Right click on .vdproj and click "Check Out for Edit" solves the problem.

Iván Kollár
  • 39
  • 1
  • 3