bUnit: `System.MissingMethodException` after update to .NET 8 RC 2

after updating to .NET 8 RC 2 our tests fail with the following exception:

System.MissingMethodException: 
Method not found: 'System.String Microsoft.AspNetCore.Components.CascadingParameterAttributeBase.get_Name()'.

Stack trace:

ComponentParameterCollectionBuilder`1.GetParameterInfo[TValue](Expression`1 parameterSelector)
ComponentParameterCollectionBuilder`1.Add[TValue](Expression`1 parameterSelector, TValue value)โ€‰lineโ€‰51

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

@linkdotnet Thanks a lot. the latest preview version (1.24.9-preview) is working fine for me ๐Ÿ‘.

Ah fair - I also run rc.2 locally. But that bit is anyway interesting. Why should it fail with a type that is provided by the framework and not us.

Guessing it is because rc1 and rc2 are not binary compatible.

Upgrading to <PackageReference Include="bunit" Version="1.24.8-preview" /> fixes the problem for me.