This code brings compiler exception "ambiguous invocation" when using 6.0.0 version, but works with lower versions.
private class Test1
{
public string Name { get; set; }
}
private class Test2
{
public string Name { get; set; }
}
[Fact]
public async Task Test_Case()
{
var test1 = new Test1();
var test2 = new Test2();
//Work around
//Expression<Func<IMemberInfo, bool>> expression = info => info.Name == "Level.Level.Text";
//test1.Should().BeEquivalentTo(test2, opts => opts.Excluding(expression));
test1.Should().BeEquivalentTo(test2,
opts => opts.Excluding(ctx => ctx.SelectedMemberPath == "Level.Level.Text"));
}