What TFS folder should the solution file be bound

2019-01-29 08:10发布

I'm using Visual Studio 2013 Pro, update 4, and TFS for version control. I'm not having a good time.

VS keeps insisting on checking out the solution file when I open my (multi-project) solution. It also gives an error "Unspecified Error" (thanks) for every project in the solution.

I had a hunch that the source control bindings were wrong, and indeed many of the posts online suggest unbinding and re-binding. However, the problem seems to re-appear every time I close and restart VS.

One thing that strikes me is that the solution file appears to be bound to the folder for one of my projects. If I un-bind and re-bind, then it gets re-bound to the top-level folder as I'd expect. But then when I re-start VS, it snaps back to the original binding.

Before I go chasing other potential problems, I'd just like to clear up whether it's normal for the solution file to be bound to one of the project folders (even though the file is physically located one level above all the project folders)?

1条回答
仙女界的扛把子
2楼-- · 2019-01-29 08:55

Whenever I find messed up bindings I always follow the same process:

  • Close VS
  • Open the SLN file in Notepad.
  • Remove the GlobalSection (sometimes more than 1) that contains all the SCC elements
  • Check the csproj file has the 4 <Scc**> elements with a value SAK. If not update all 4 to be SAK (see below).
  • Open the SLN file in VS.
  • Select the Solution at the top of Solution Explorer
  • File, Source Control, Advanced, Change Source Control
  • Find the Solution in the list and select it.
  • Click the "Bind" button.

This usually sorts it for me when you re-open it, everything is OK.

The <Scc**> elements should look like this:

<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
查看更多
登录 后发表回答