Very long build time in Visual Studio

霸气de小男生 提交于 2019-12-10 15:57:37

问题


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#.


回答1:


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.




回答2:


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



回答3:


Try closing the tool panes associated with unit testing.




回答4:


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?



来源:https://stackoverflow.com/questions/1638775/very-long-build-time-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!