且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Mac文件共享/UNC路径上工作时,奇怪的Visual Studio TFS行为

更新时间:2022-11-08 15:00:03

我要做的是将本地工作区更改为Visual Studio中的服务器工作区(Parallels上为macOS Sierra + Windows 10);

What I did was to change the local workspace to a server workspace in Visual Studio (macOS Sierra + Windows 10 on Parallels);

  • 文件>源代码管理>高级>工作区...
  • 在列表中选择您的工作区,然后点击编辑...
  • 高级>>
  • 位置更改为服务器,然后按 OK Close
  • File > Source Control > Advanced > Workspaces...
  • Select your workspace in the list and hit Edit...
  • Hit Advanced >>
  • Change Location to Server and hit OK and Close

现在,您无需搁置就可以登录.

Now you should be able to check in without needing to shelve.

请注意,有一些本地工作区和服务器工作区之间的差异,但是在我的情况下,它可以很好地与服务器工作区一起使用;

Note that there are some differences between a local and server workspace, but in my case it works just fine with a server workspace;

为什么要使用本地工作区?

使用本地工作区时,您将获得以下好处:

Why should I use a local workspace?

When you use a local workspace, you get the following advantages:

轻松脱机工作.当您将自己的文件 网络连接不可用或不可靠.从解决方案 资源管理器,您可以在其中添加,编辑,删除,重命名,撤消和比较项目 您的工作区,即使您没有连接到Team Foundation 服务器.

Work offline easily. You can quickly begin editing a file when your network connection is unavailable or unreliable. From Solution Explorer you can add, edit, delete, rename, undo, and compare items in your workspace even when you're not connected to your Team Foundation Server.

轻松恢复在本地删除的文件.在本地恢复 删除的文件,只需获取文件即可.

Easily restore files that you have deleted locally. To restore locally deleted files, just get your files.

Visual Studio自动检测更改.添加或删除时 在Visual Studio外部的文件中,程序会自动检测到 这些变化.

Visual Studio automatically detects changes. When you add or delete files outside of Visual Studio, the program automatically detects these changes.

重要:使用本地工作区的一个缺点是性能 随着项目数量的增加而降低.请参阅下一节 细节.

Important: One drawback to using a local workspace is that performance degrades as the number of items increases. See the next section for details.

我什么时候需要使用服务器工作区?

使用服务器工作区时,Visual Studio仅保留以下内容的一个副本: 每个文件.这样可以大大减少磁盘空间使用并提高 有很多物品时的性能.我们建议您使用 服务器工作空间,如果:

When might I need to use a server workspace?

When you use a server workspace, Visual Studio keeps only one copy of each file. This can significantly reduce disk space usage and improve performance when you have a lot of items. We recommend that you use a server workspace if:

您的工作区包含超过100,000个项目.

Your workspace contains more than 100,000 items.

您要使用Visual Studio 2010或更早版本进行处理 工作区.

You want to use Visual Studio 2010 or earlier versions to work with the workspace.

您需要使用启用最新的结帐功能选项.

困难且性能低下的脱机工作. 在服务器工作区中处于脱机状态,则无法使用本地文件 因为它们是只读的,直到您将它们签出为止.你可以退房 仅从解决方案资源管理器访问文件,并且仅在切换到 离线模式(如下所述).离线时无法 执行任何其他操作,例如添加,删除,重命名或撤消.

Work offline with difficulty and with poor performance. When you are offline in a server workspace, you cannot work with your local files because they are read-only until you check them out. You can check out files only from Solution Explorer, and only after you switch to offline mode (as explained below). While you're offline, you can't perform any other operations, such as add, delete, rename, or undo.

提示:您可以通过启用异步检出功能来提高响应速度. 有关更多信息,请参见管理团队项目集合工作区. 您团队的设置.

Tip: You can improve responsiveness by enabling asynchronous checkout. For more information, see Manage team project collection workspace settings for your team.