在Visual Studio 2012中启用代码合同可能会花费很长时间 [英] Enabling Code Contract in Visual Studio 2012 RC takes horribly long

查看:57
本文介绍了在Visual Studio 2012中启用代码合同可能会花费很长时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天早上安装了代码合同插件,并在其中一个项目上启用了它。我的解决方案有20多个项目,但只有5个被配置为构建,只有其中一个项目启用了代码合同检查。一个半小时前,我从VS触发了一小时
的构建。构建在大约5分钟内完成,但大多数VS UI都被禁用。我对此进行了投资,发现cccheck.exe仍在进行中,占用了超过30%的CPU和大约2G的内存。进入这个过程超过一个半小时,可怕的是,
不是吗?


代码合同是否正常。如果是,那么开发几乎是不可能的,因为你必须在开发过程中经常构建。摆脱代码合同是唯一的解决方案。我知道我可以使用不同的构建配置来启用开发
启用CC检查,但如果动态出现任何问题,这不会报告我吗?


任何解决方案?非常喜欢。

解决方案

很抱歉。


确保选项:" ;在背景中分析"设置了"缓存结果"和"缓存结果"。


第一个避免VSU冻结(分析在后台),第二个将分析结果保存在数据库中。


第一次构建数据库可能需要一些时间,但是所有其他时间都应该重复使用它(只重新分析更改的方法)和因此分析速度非常快。


仅供参考:我们正在努力提高性能,重新构建工具,以便并行分析多种方法。


请不要犹豫,提供反馈。



ciao


f


I installed code contract addon this morning and enabled it on one of the project. My solution has more than 20 projects, but only 5 of them are configured to build, only one of them has code contract check enabled. I triggered the build from the VS an hour an half ago. The build completed in about 5 minutes but most of the VS UI is disabled. I investaged this to find that cccheck.exe is still in progress, taking up over 30% of CPU and about 2G of memory. Into the process for over an hour and half, horrible, isn't it?

Is it normal for code contracts. If yes, then developemnt is almost impossible as you have to build frequently during the development. Is getting rid of code contract is the only solution. I know I can use a differen build configuration for the development withoug CC check enabled, but this will not report me if anything's wrong on the fly?

Any solution to this?, much appricated.

解决方案

Sorry about that.

Make sure that the options: "analyze in background" and "cache results" are set.

The first avoids VSU to freeze (the analysis is in background) and the 2nd one saves the analysis results in a DB.

The very first time it may take some time to build the database, but all the other times you should reuse it (only the methods that changed are re-analyzed) and so the analysis will be very fast.

FYI: We are working on improving the performance, by re-architecturing the tool so to analyze multiple methods in parallel.

Please do not hesitate to provide feedback.

ciao

f


这篇关于在Visual Studio 2012中启用代码合同可能会花费很长时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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