加快 ASP.NET 中的构建时间 [英] Speeding up build times in ASP.NET

查看:25
本文介绍了加快 ASP.NET 中的构建时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前参与了一个 ASP.NET 项目,解决方案中有大约 40 个项目.我们在克隆的 Virtual PC 环境中进行所有开发,因此所有开发人员都有相同的设置.这一切都很好,管理依赖关系很容易,但是构建解决方案非常慢.Virtual PC 只能使用一个 CPU,所以我实际上只使用了一半的计算机资源.

I am currently involved in a ASP.NET project with about 40 projects in the solution. We are doing all our development in cloned Virtual PC environments so all developers have identical setups. That's all good, managing dependencies is easy, however building the solution is horribly slow. Virtual PC can only utilize one CPU so I'm really only using half of my computers resources.

从构建到完整的页面加载需要整整 3 分钟.随着项目的增长,这种情况每天都在变得更糟.修复简单的事情开始需要很长时间,就个人而言,我一直在等待,因为在计算机编译时我无法真正工作.

It takes a full 3 minutes from build to a complete page load.. and it's getting worse every day as the projects grow. Fixing simple things is starting to take a long time and personally, I'm getting frustrated waiting all the time as I can't really work while the computer is compiling.

有没有什么方法可以在多台计算机上分发我的构建以加快构建过程?

Is there any way of distributing my build across several computers to speed up the build process?

SSD 会显着缩短我的构建时间吗?

Would an SSD noticeably improve upon my build times?

还有其他加快构建速度的方法吗?

Are there any other way of speeding up the build?

注意:我曾尝试使用 ngen 预编译静态依赖项,但后来得知 ASP.NET 不支持 ngen.我使用 Visual Studio 2008,虚拟环境中没有防病毒软件.

Note: I have tried precompiling static dependencies with ngen but later read that ASP.NET does not support ngen. I use Visual Studio 2008 and there is no antivirus software present in the virtual environment.

推荐答案

您可以通过执行以下操作大大减少等待 ASP.NET 构建的时间:

You can greatly reduce the time you wait for a build with ASP.NET by doing the following:

  • 使用新的optimizeCompilations";旗帜.它会告诉 .NET 不要仅仅因为您更改了一个项目/dll 而重建整个项目.如果您有 40 个项目并且您不使用它,那么每次您在一个项目中更改一个简单方法时,.NET 都会尝试编译所有其他项目和 dll.使用新标志(加上安装修补程序),您将在开发过程中看到整体性能大幅提升.

这篇关于加快 ASP.NET 中的构建时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆