Very long build time in Visual Studio

2019-06-26 04:43发布

I've a solution with 15 projects (14 class libraries and one web application). Each class library has corresponding test project (i.e. if I have MyApp.Services project there exists MyApp.Services.Tests -- using NUnit). Everything is written in VB.NET. The problem is that when VS tries to compile any of *.Tests project it stops responding (the bigger the project the longer the period without reposnse). I don't know where to start looking for an issue. I'll add that I've R# 4.5 installed.

UPDATE 1:

Is there any way to benchmark a build in visual studio? To get build times for every project?

UPDATE 2:

It seems that there is no difference after disabling R#.

4条回答
Ridiculous、
2楼-- · 2019-06-26 04:51

Have you tried disabling Resharper 4.5, using the Tools->Addins menu, and tried building again?

Also, is there a difference in time if you shutdown VS, restart it and load your solution and try building again before you do anything else. It might be that the build times get slower over time?

查看更多
一纸荒年 Trace。
3楼-- · 2019-06-26 04:52

Try closing the tool panes associated with unit testing.

查看更多
戒情不戒烟
4楼-- · 2019-06-26 04:53

Try turning on verbose logging for the build

Tools...Options...Projects and Solutions...Build and Run..."MSBuild project build output verbosity"

This should help you get a better picture of what is going on.

查看更多
Melony?
5楼-- · 2019-06-26 05:05

Disabling Resharper will probably help.

As for the benchmark, try building with msbuild with the following options, it will print statistics on build process at the end.

msbuild yoursolution.sln /verbosity:diagnostic
查看更多
登录 后发表回答