解决方案文件应该绑定到哪个 TFS 文件夹? [英] What TFS folder should the solution file be bound to?

查看:22
本文介绍了解决方案文件应该绑定到哪个 TFS 文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio 2013 Pro、更新 4 和 TFS 进行版本控制.我玩得很不开心.

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

当我打开我的(多项目)解决方案时,VS 一直坚持检查解决方案文件.它还为解决方案中的每个项目提供错误未指定的错误"(感谢).

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.

我有一种预感,源代码控制绑定是错误的,而且实际上很多在线帖子都建议取消绑定和重新绑定.但是,每次关闭并重新启动VS时,问题似乎都会重新出现.

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.

让我印象深刻的一件事是解决方案文件似乎绑定到我的一个项目的文件夹中.如果我取消绑定并重新绑定,那么它会像我期望的那样重新绑定到顶级文件夹.但是当我重新启动 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)?

推荐答案

每当我发现绑定混乱时,我总是遵循相同的流程:

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

  • 关闭VS
  • 在记事本中打开 SLN 文件.
  • 删除包含所有 SCC 元素的 GlobalSection(有时超过 1 个)
  • 检查 csproj 文件是否有 4 个 元素,其值为 SAK.如果没有将所有 4 个更新为 SAK(见下文).
  • 在 VS 中打开 SLN 文件.
  • 选择解决方案资源管理器顶部的解决方案
  • 文件、源代码管理、高级、更改源代码管理
  • 在列表中找到解决方案并选择它.
  • 点击绑定"按钮.
  • 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.

元素应如下所示:

<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>

这篇关于解决方案文件应该绑定到哪个 TFS 文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆