当我重建我的C#应用程序时,我经常没有得到我的代码合同分析的结果。这是由以下错误消息我可以手动运行代码合同分析吗?
CodeContracts: MyApp.Client.Model: Analysis method MyApp.Client.Model.MyClass.CreateCalculatedElements(System.Collections.Generic.List1<System.Collections.Generic.KeyValuePair2<System.String,MyCompany.Scripting.ICompiledFunction1<System.Object>>>,System.Collections.Generic.Dictionary2<System.String,MyCompany.Scripting.ICompiledFunction1<System.Decimal>>,System.Collections.Generic.Dictionary2<System.String,MyCompany.Scripting.ICompiledFunction1<System.Decimal>>) timed out
这里是导致该方法
internal void CreateCalculatedElements(
List<KeyValuePair<string, ICompiledFunction<object>>> preFinalCalculationScripts,
Dictionary<string, ICompiledFunction<decimal>> factorCalculators,
Dictionary<string, ICompiledFunction<decimal>> elementCalculators)
的定义,这并不总是超时。有没有一种方法可以通过重建解决方案手动运行合同检查而不是通过一个项目而不是全部?
dir * .rsp/s在我的项目文件夹或子文件夹内的任何地方都没有显示任何.rsp文件。 – 2013-04-25 10:39:59
嗯,那很奇怪。你没有使用一些真正的旧版本吗?很久以前我们引入了.rsp文件。只有在实际启用静态检查器并至少执行一次构建时才会写入这些文件。清理构建时,它们也会被删除。 – 2013-04-25 14:50:39
Manuel,是否有计划支持在Visual Studio上手动运行静态分析的功能?我们的团队能够像代码分析(FxCop)一样运行它,它有一个对话框,您可以在其中选择一个项目或整个解决方案并根据此分析运行分析,这对我们的团队非常有用。 – julealgon 2015-01-12 21:26:05