加快构建时间在ASP.NET时间、ASP、NET

2023-09-03 09:23:18 作者:我愿甘心垫底衬你的高贵。

我目前参与我的ASP.NET项目在解决方案中约40个项目。我们正在尽我们所有的发展中克隆的虚拟PC环境,让所有的开发人员具有相同的设置。这一切都很好,管理依赖很容易,但构建解决方案是可怕的慢。虚拟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?

注意:我曾尝试precompiling静态依赖关系的 NGEN 的,但后来读了ASP.NET不支持的 NGEN 的。我使用Visual Studio 2008并没有杀毒软件present在虚拟环境中。

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。随着新标志(加上修补程序的安装),你会看到很多提高整体性能的开发过程中。检查出来这个博客帖子就如何加快构建与此optimizeCompilations标志细节:http://www.wagnerdanda.me/2009/11/optimizing-asp-net-build-time-with-dynamic-compilation-and-optimizecompilations/

希望它能帮助!

瓦格纳丹达席尔瓦