Hello,
When using NCrunch on a .NET 5 project, that uses C# 9 records, NCrunch returns the following error for each tests :
System.InvalidProgramException: Common Language Runtime detected an invalid program.
The code that throws :
state with { Loading = true };
Where state is a record
This exception doesn't happens with standard test explorer.
Any way to avoir this ?
Thanks
Daily Usage Issues
System.InvalidProgramException: Common Language Runtime detected an invalid program.
Started by htssoftwares on 5,089 views
Remco NCrunch Developer
#15115
25 Nov 2020 23:24 UTC
Hi, thanks for sharing this issue.
We have a fix pending for this that we're hoping to push late this week. You can use the dev build below if you need the fix earlier:
NCrunch_Console_4.6.0.2.msi
NCrunch_Console_4.6.0.2.zip
NCrunch_GridNodeServer_4.6.0.2.msi
NCrunch_GridNodeServer_4.6.0.2.zip
NCrunch_LicenseServer_4.6.0.2.zip
NCrunch_VS2008_4.6.0.2.msi
NCrunch_VS2010_4.6.0.2.msi
NCrunch_VS2010_4.6.0.2.zip
NCrunch_VS2012_4.6.0.2.msi
NCrunch_VS2012_4.6.0.2.zip
NCrunch_VS2013_4.6.0.2.msi
NCrunch_VS2013_4.6.0.2.zip
NCrunch_VS2015_4.6.0.2.msi
NCrunch_VS2015_4.6.0.2.msi.7z
NCrunch_VS2015_4.6.0.2.zip
NCrunch_VS2017_4.6.0.2.msi
NCrunch_VS2017_4.6.0.2.msi.7z
NCrunch_VS2017_4.6.0.2.zip
NCrunch_VS2019_4.6.0.2.msi
NCrunch_VS2019_4.6.0.2.msi.7z
NCrunch_VS2019_4.6.0.2.zip
We have a fix pending for this that we're hoping to push late this week. You can use the dev build below if you need the fix earlier:
NCrunch_Console_4.6.0.2.msi
NCrunch_Console_4.6.0.2.zip
NCrunch_GridNodeServer_4.6.0.2.msi
NCrunch_GridNodeServer_4.6.0.2.zip
NCrunch_LicenseServer_4.6.0.2.zip
NCrunch_VS2008_4.6.0.2.msi
NCrunch_VS2010_4.6.0.2.msi
NCrunch_VS2010_4.6.0.2.zip
NCrunch_VS2012_4.6.0.2.msi
NCrunch_VS2012_4.6.0.2.zip
NCrunch_VS2013_4.6.0.2.msi
NCrunch_VS2013_4.6.0.2.zip
NCrunch_VS2015_4.6.0.2.msi
NCrunch_VS2015_4.6.0.2.msi.7z
NCrunch_VS2015_4.6.0.2.zip
NCrunch_VS2017_4.6.0.2.msi
NCrunch_VS2017_4.6.0.2.msi.7z
NCrunch_VS2017_4.6.0.2.zip
NCrunch_VS2019_4.6.0.2.msi
NCrunch_VS2019_4.6.0.2.msi.7z
NCrunch_VS2019_4.6.0.2.zip
Hello Remco,
Thank you for your answer.
I downloaded and installed the build 4.6.0.2, however, I still have this issue.
For now, I'll disable NCrunch on this project and turn on Live Unit Testing, as it works with this.
But I'll be happy to re-enable NCrunch when this will be fixed !
Thank you for your answer.
I downloaded and installed the build 4.6.0.2, however, I still have this issue.
For now, I'll disable NCrunch on this project and turn on Live Unit Testing, as it works with this.
But I'll be happy to re-enable NCrunch when this will be fixed !
Remco NCrunch Developer
#15117
26 Nov 2020 07:26 UTC
htssoftwares wrote:
Thank you for your answer.
I downloaded and installed the build 4.6.0.2, however, I still have this issue.
Thanks for coming back to me on this. Your feedback here sets off alarm bells for me, as I was so sure that we had fixed this problem in the build above.
Can you check that you have v4.6.0.2 showing in the 'About' page for NCrunch? If so, is there any chance you can build a sample solution demonstrating the problem that you might be able to share with me? You can submit code in ZIP form through the NCrunch support contact form.
I have 4.6.0.2 on about page (BTW, copyright dates end in 2018).
I posted the sln that fails on my machine.
I posted the sln that fails on my machine.
Remco NCrunch Developer
#15119
26 Nov 2020 08:53 UTC
Thanks for the fast response! I think I know what's happening here.
Can you set the 'Instrumentation Mode' solution-level setting to 'Optimised' to see if this solves the issue?
Can you set the 'Instrumentation Mode' solution-level setting to 'Optimised' to see if this solves the issue?
It works perfectly ! Thank you :-)
Remco NCrunch Developer
#15121
26 Nov 2020 09:51 UTC
Deleted post
#15130
27 Nov 2020 11:51 UTC
Helped us as well, thanks for the fix :)
Post a reply
Log in to reply.