大的C#编译时间增加了吗? [英] Large C# compile time increase?

查看:220
本文介绍了大的C#编译时间增加了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我维护一个用于构建C#解决方案的构建系统.
该代码库由VS解决方案文件组成,目前在代码库中约有160个组件.
自动构建在使用CruiseControl和NAnt的专用构建服务器上运行,以构建每个构建的整个代码库.

组件之一由大约120个C#项目组成.在开发机器上以及直到最近在构建服务器上,该解决方案的完整重建过程都需要3到4分钟.

大约2周前,在一次构建和一次构建之间,该组件的编译时间跃升至16分钟.没有其他组件显示出类似的构建时间增长.

我们假定这与中间文件挂在某个地方有关,因此我删除了整个AccuRev工作区,然后将其重新填充到构建计算机上.
此组件的构建时间从10个构建(超过4天)减少到3分钟左右,然后又跳回了16分钟.
几天后,我重复删除并重新填充工作区,这次将5次构建的构建时间回落到3分钟,然后又跳回了16分钟.

我已存档日志文件,释放了磁盘空间并整理了硬盘驱动器的碎片.

我有点茫然地解释为什么会这样.
这仅在构建机器上发生,开发人员构建需要3-4分钟.

如果有人对导致像这样的C#解决方案的编译时间急剧增加的内容有任何建议,我将不胜感激.

谢谢,

I maintain a build system for building C# solutions.
The code base is componentized by VS solution files and there are currently about 160 components in the code base.
The automated builds are run on a dedicated build server using CruiseControl and NAnt to build the entire code base each build.

One of the components consists of about 120 C# projects. On development machines and up until recently on the build server a complete rebuild of this solution took between 3 and 4 minutes.

About 2 weeks ago, between one build and the next, the compile time for this component jumped to 16 minutes. No other component exhibited a similar increase in build time.

We assumed this had something to do with intermediate files hanging around somewhere, so I deleted the entire AccuRev workspace and repopulated it on the build machine.
Build times for this component dropped back to around 3 minutes for 10 builds (over 4 days) and then jumped back to 16 minutes.
After a couple of days I repeated the workspace delete and repopulate and the build times dropped back to 3 minutes for 5 builds this time before jumping back to 16 minutes.

I have archived log files, freed up disk space and defragmented the hard drive.

I''m at a bit of a loss to explain why this is happening.
This only occurs on the build machine, developer builds take 3-4 minutes.

If anyone has any tips on what might be causing a dramatic increase in compile time for a C# solution like this, I''d appreciate hearing them.

Thanks,

推荐答案

您好,今天我已经找到了这篇文章.我认为这对您有用.

加快Visual Studio构建速度 [
Hi, Today I have found this article. I think this would be useful for you.

Speed up Visual Studio Builds[^]


这篇关于大的C#编译时间增加了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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