TFS: Get latest causes slow project reloading

2019-07-08 10:34发布

We're working with a solution which has multiple projects which references NuGet packages from other solutions.

Every time we do get latest from the TFS server on the solution, Visual Studio (2015) starts reloading each project in the solution which takes a really long time. Now this wasn't always the case, since this started happening only a few weeks back (the solution is a year old).

We have other solutions which were already experiencing this problem and our solution is to close the solution, then do get latest, then reload the project which is much, much faster.

Can anybody explain why this is happening and how to fix this issue?

1条回答
唯我独甜
2楼-- · 2019-07-08 11:23

This has been reported as a bug to MSFT, see Slow project reloading & Reload of projects is slow after call to TFS to get latest changeset. It seems your project files are updated from outside VS, which causes VS to load all them. More details please see the reply from VS IDE team:

Main culprit is, your project files are being updated from outside VS, which causes VS to load each of them one by one. This is extremely taxing process and it happens on the main UI thread. Hence, this ASL logic is on-by-default to alleviate unresponsive solution loads. Essentially, you’re pointing out a limitation in our ASL logic that we hadn’t considered. This will be considered for a future release, thank you.

In the meantime, one way to mitigate the problem would be to force solution reload by touching the solution file, the *.sln file, which will trigger ASL to kick in, basically VS thinking you’re doing full solution load and it will optimize responsiveness time as much as possible.

Ulzii Luvsanbat

Visual Studio IDE Team

查看更多
登录 后发表回答