When first loading NCrunch on this project with the new optimized mode, it gave an exception in the build of the project. (Which was visible in the NCrunch Processing Queue). Reverting back to legacy mode allowed the project to build fine.
We do use Fody for IL weaving,
.Net Framework 4.5.2 on this particular project.
NCrunch Version v4.0.02
VS 2019 16.3.7
[07:46:55.4595-LocalBuildTask-51] ERROR: nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'AJG.BSD.Framework.Services.Logging.ApiCallProxyLoggerAsync' due to exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetRowByMethodDefIndex(UInt32 methodDefTableRowIndex)
at nCrunch.Compiler.Cil.Methods.CilMethodDefinition.TryResolveASyncTarget()
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
at nCrunch.Compiler.CilProcessingTasks.CilMethodHashingTask..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
[07:46:55.4665-LocalBuildTask-51] ERROR (Internal): nCrunch.Compiler.NewStaticManipulation.CilTypeHashException: Unable to hash type 'AJG.BSD.Framework.Services.Logging.ApiCallProxyLoggerAsync' due to exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetRowByMethodDefIndex(UInt32 methodDefTableRowIndex)
at nCrunch.Compiler.Cil.Methods.CilMethodDefinition.TryResolveASyncTarget()
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.(Boolean , ClassMethodData , Dictionary`2 , CilTypeDefinition , FNV64& , CilMethodDefinition )
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.ExtractClassMethodData(TestFrameworkDescription[] applicableTestFrameworks, IDictionary`2 codeFileIDsByForegroundFilePath, Boolean storeImpactHashes)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress)
at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.ProcessingQueue..()
Thanks,
Mark Smith