简体   繁体   English

VS 2012 TFS工作区和项目

[英]VS 2012 TFS Workspaces and Projects

I don't seem to get how to work with workspaces and projects. 我似乎没有得到如何使用工作区和项目。 We have two main projects which have no relation to each other. 我们有两个主要项目,彼此没有关系。 Locally I have made two workspaces, one for Project1 and one for Project2. 在本地我创建了两个工作区,一个用于Project1,另一个用于Project2。

If I work on Project1, I select this project from Team Explorer. 如果我在Project1上工作,我从团队资源管理器中选择这个项目。 In the source control explorer I select the workspace for Project1, open the solution from this workspace and I start working. 在源代码管理资源管理器中,我选择Project1的工作区,从此工作区打开解决方案,然后我开始工作。

Question 1: What does it do when I select a project from Team Explorer, it seems to have no effect on what I am doing? 问题1:当我从团队资源管理器中选择项目时它做了什么,它似乎对我正在做的事情没有影响?

When I do not check in anything and I want to work shortly on project 2, I do the same. 当我没有检查任何东西而且我想在项目2上很快工作时,我也是这样做的。 So I select project2 from Team Explorer, select the workspace for project 2, open the solution from this workspace and do some work. 所以我从团队资源管理器中选择project2,选择项目2的工作区,从这个工作区打开解决方案并做一些工作。 Now the problem: If I want to checkin the changes I made in project2, I see also the pending changes for project1?? 现在问题是:如果我想检查我在project2中所做的更改,我还会看到project1的挂起更改? But I am working in project 2 and have also that workspace selected. 但我正在项目2中工作,并且还选择了工作空间。

I somehow miss the point... 我不知何故错过了这一点......

Some background info: we used to work with SVN and recently switched to Team Foundation Service on visualstudio.com, I just am unable to find some answers. 一些背景信息:我们曾经使用SVN,最近切换到visualstudio.com上的Team Foundation Service,我无法找到一些答案。

Thanks, 谢谢,

Erik 埃里克

Workspaces are basically a way to switch between active work streams and configurations. 工作区基本上是一种在活动工作流和配置之间切换的方法。 For example, I can be working on a feature branch of a project and I'm asked to quickly fix a bug in the same branch, but without my new changes - or to stop working on that feature and fix a bug in a release branch. 例如,我可以处理项目的功能分支,并且我被要求快速修复同一分支中的错误,但没有我的新更改 - 或者停止处理该功能并修复发布分支中的错误。 Using multiple workspaces are just one way to achieve that quickly. 使用多个工作区只是快速实现这一目标的一种方法。

Effectively, you can think of a workspace as a local repository of code; 实际上,您可以将工作空间视为本地代码存储库; all the changes I do in there are local to that workspace. 我在那里做的所有更改都是该工作区的本地更改。

If you have two unrelated projects, then I don't believe that maintaining two separate workspaces will give you any advantage. 如果你有两个不相关的项目,那么我不相信维护两个独立的工作区会给你带来任何好处。 This article goes into more depth; 本文更深入; but my advice would be that if you're not familiar with TFS then try using it without multiple workspaces until you come to an issue that having multiple workspaces will solve for you. 但我的建议是,如果你不熟悉TFS,那么在没有多个工作空间的情况下尝试使用它,直到你遇到一个有多个工作空间为你解决的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM