question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"System.InvalidProgramException : Common Language Runtime detected an invalid program." when running some tests

See original GitHub issue

I’m seeing errors similar to this one since 2.0.0-ci-20180325225037:

Failed   Product.MacroService.Tests.Concept.ConceptServiceTests.GetPersonConceptSummaryTest
Error Message:
 System.InvalidProgramException : Common Language Runtime detected an invalid program.
Stack Trace:
   at Product.MacroService.Concept.Services.ConceptService.<>c.<CalculateConceptFields>b__4_0(Part p)
   at System.Linq.Enumerable.WhereListIterator`1.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Product.MacroService.Concept.Services.ConceptService.CalculateImmunizationFields(PersonConceptSummary summary)
   at Product.MacroService.Concept.Services.ConceptService.<GetPersonConceptSummary>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Product.MacroService.Tests.Concept.ConceptServiceTests.<GetPersonConceptSummaryTest>d__4.MoveNext() in /mnt/c/git/product/macroservice/test/Product.MacroService.Tests/Concept/ConceptServiceTests.cs:line 71
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

I’m not sure if it helps, but every failure is with something working with System.Collections.Generic.List or System.Linq.Enumerable.

My development environment is Windows 10/WSL with an up-to-date Ubuntu 16.04 installation. I’m using .NET Core 2.0.0.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SapientGuardiancommented, May 17, 2018

I do not have the issue with 2.0.0-ci-20180517205544

0reactions
lucaslorentzcommented, May 17, 2018

@saxonww @Valeriy1991 @SapientGuardian Can you please check if you have same issue with version 2.0.0-ci-20180517205544?

Read more comments on GitHub >

github_iconTop Results From Across the Web

InvalidProgramException / Common Language Runtime ...
First of all clean up all pdb's. You can try to do it via "Clean solution" option in the context menu of you...
Read more >
Common Language Runtime detected an invalid program.
After updating to version 15.8.0 of Visual Studio 2017 I am getting an exception when running my ASP.NET Webforms application.
Read more >
Scoped service resolving: 'Common Language Runtime ...
After several successful operations (5 - 6) ServiceProvider throws System.InvalidProgramException: 'Common Language Runtime detected an invalid ...
Read more >
How to fix Common Language Runtime detected an invalid ...
Type : InvalidProgramException. Message : Common Language Runtime detected an invalid program. Source : mscorlib. Stack Trace: at System.
Read more >
Common Language Runtime detected an invalid program
Hi, We use DevExpress with WPF, currently running v20.2.5. The app is years old, stable, rarely changes, and hasn't seen a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found