Visual Studio 中的构建时间非常长
我有一个包含 15 个项目(14 个类库和一个 Web 应用程序)的解决方案。每个类库都有相应的测试项目(即,如果我有 MyApp.Services 项目,则存在 MyApp.Services.Tests ——使用 NUnit)。一切都是用 VB.NET 编写的。问题是,当 VS 尝试编译任何 *.Tests 项目时,它会停止响应(项目越大,无响应的时间越长)。我不知道从哪里开始寻找问题。我会补充说我已经安装了 R# 4.5。
更新 1:
有什么方法可以在 Visual Studio 中对构建进行基准测试吗?获取每个项目的构建时间?
更新2:
禁用R#后似乎没有什么区别。
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#.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试打开构建
工具...选项...项目和解决方案...构建并运行...的详细日志记录...“MSBuild 项目构建输出详细信息”
这应该可以帮助您更好地了解正在发生的情况。
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.
禁用 Resharper 可能会有所帮助。
至于基准测试,请尝试使用 msbuild 并使用以下选项进行构建,它会在最后打印有关构建过程的统计信息。
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.
尝试关闭与单元测试相关的工具窗格。
Try closing the tool panes associated with unit testing.
您是否尝试过使用“工具”->“插件”菜单禁用 Resharper 4.5,然后再次尝试构建?
另外,如果您关闭 VS,重新启动它并加载您的解决方案并在执行其他操作之前再次尝试构建,时间是否会有所不同。随着时间的推移,构建时间可能会变慢?
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?