TFS Issue: No source control options (get latest, check-out, check-in) for Solution

自闭症网瘾萝莉.ら 提交于 2019-12-07 06:02:48

问题


Background

I created a new project with Microsoft's Team Foundation Service (tfs.visualstudio.com). I added code (Orchard CMS) which includes the solution file and performed initial check-in. To make sure nothing was missed, I removed mappings and deleted my local. Then got latest and reestablished mappings. I opened the solution, built it and set up a local site. Everything worked fine.

Issue

Whenever I open/load the solution, I noticed that I don't have the usual TFS options like get latest, check-out and check-in and source control options. Then I noticed an add to source control option (see below)

Whenever I click on it, I get told that the 'item 'Orchard.sln' is already under source control'

Without source control, I don't have the options and I can't track which files have been updated or not, and the locks as well. Can anyone help please?


回答1:


All the source control settings are in the SLN file.

Open it up with notepad, and remove the following GlobalSection (there can be more than one sometimes):

GlobalSection(TeamFoundationVersionControl) = preSolution
    ...Stuff...
EndGlobalSection

Now re-bind the solution and project using the: File, Source Control, Advanced, Change Source Control... option.

This should setup the binding correctly. If you check in these changes to SLN, vspcc, csproj files it will stay.




回答2:


I was having the same problem. When I opened a file in solution explorer and modified it, it was being checked out.

I fixed it by unbinding my solution and projects and then rebinding them.

To unbind:

(1) selecting my solution in solution explorer (2) selecting File -> Source Control Advanced -> Change Source Control (3) clicking unbind for my solution and all projects (4) click OK

To bind: (1) selecting my solution in solution explorer (2) selecting File -> Source Control Advanced -> Change Source Control (3) clicking bind my solution and all projects (4) click OK

These files will appear under Pending Changes. After I checked them in,, I tested if it worked.

I went to solution explorer, opened one of my .cs files, went to an end of line of code hit enter, and noticed it immediately got checked out.

I didn't have to open my solution in notepad and delete anything as mentioned in another answer.

NOTE: I am using VS 2012 Pro and TFS 2010.



来源:https://stackoverflow.com/questions/17446945/tfs-issue-no-source-control-options-get-latest-check-out-check-in-for-solut

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!