Build/Test Issues

ncrunch console tool - Common Language Runtime detected an invalid program

Started by michaellogutov on 5,256 views

I've runned into a very strange issue that making our CI flow very fragile - we've got our tests running by nCrunch console tool and it throws us this exception:


System.InvalidProgramException: Common Language Runtime detected an invalid program. 
 at Tests.App.<ProcessAsync>d__3.MoveNext() 
...


The bad thing - it doesn't failing in VS2015

I've manage to narrow it to two things: using NLog and using exception filtering (when (ex is ...))
I've created the sample project: https://drive.google.com/file/d/0B5RgoAhFxNyVM2R1bVJxSlk3VEU/view?usp=sharing

To reproduce an error I've used this command line with NCrunch Console Tool v2.26.0.1:


"C:\Program Files (x86)\Remco Software\NCrunch Console Tool\NCrunch.exe" "d:\temp\Tests\Tests.sln" /o "D:\Temp\NCrunchOutput" /t /vs 2015 -LogVerbosity Detailed
Hi, thanks for sharing this issue.

This is caused by a compatibility issue between NCrunch's instrumentation and exception filters.

A fix for this has been released in v2.27. Upgrading the console tool to the latest version should solve this problem.

Post a reply

Log in to reply.