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

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

问题描述

我正在使用Visual Studio 2013 Pro,Update 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个<Scc**>元素,其值均为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.

<Scc**>元素应如下所示:

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

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

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