I am having a problem with a project not building in NCrunch. It seems to be similar to this post (http://forum.ncrunch.net/yaf_postsm4052_Issue-when-using-NCrunch-with-Code-Contracts-and-Fody.aspx#post4052), but it's an internally developed NuGet package, where I just implemented a generic class. When I try to implement this generic abstract class in one of my projects, I get the following Exception message below. This only happens in NCrunch. I even removed the generic class in our NuGet project and NCrunch was able to build the project as expected.
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
at _Mono.Collections.Generic.Collection`1..ctor(Int32 capacity)
at _Mono.Cecil.Cil.CodeReader.ReadCode()
at _Mono.Cecil.Cil.CodeReader.ReadFatMethod()
at _Mono.Cecil.Cil.CodeReader.ReadMethodBody()
at _Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
at _Mono.Cecil.MethodDefinition.<>c.<get_Body>b__36_0(MethodDefinition method, MetadataReader reader)
at _Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at _Mono.Cecil.MethodDefinition.get_Body()
at nCrunch.Reflection.Cecil.CecilMethod.get_HasBody()
at nCrunch.TestExecution.Frameworks.DefaultClassMethodDescriptionLocator.ExtractClassMemberDataFromType(ReflectedType type, Boolean hashAllMethods)
at nCrunch.Compiler.StaticManipulation.BuiltAssembly.(ReflectedAssembly , IDictionary`2 , TestFrameworkDescription[] , Boolean )
at nCrunch.Compiler.StaticManipulation.BuiltAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByFilePath, Boolean hashMethods)
at nCrunch.Compiler.RemoteBuildRunner..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentBuildParameters , FilePath , BuildOutput , DirectoryPath[] , FilePath[] )
at nCrunch.Compiler.RemoteBuildRunner..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentBuildParameters )