Dropdown Stopped working after System.Linq.Dynamic.Core upgrade to 1.6+

I started running into the below error in Radzen Dropdown after upgrading System.Linq.Dynamic.Core. While I understand this is not directly your issue I found out that the dynamic project no longer supports any calls on the Object class. Their reasoning is due to a CVE. This however probably needs to be addressed in your SelectItemFromValue to no longer either use their library or change that to not be an object. As people upgrade due the the mentioned CVE in System.Linq.Dynamic.Core more and more people will have their dropdowns stop working...

System.Linq.Dynamic.Core Upgrade Notes:

Your Code

        /// <summary>
        /// Selects the item from value.
        /// </summary>
        /// <param name="value">The value.</param>
        protected virtual void SelectItemFromValue(object value)
        {
            var view = LoadData.HasDelegate ? Data : View;
            if (value != null && view != null)
            {
                if (!Multiple)
                {
                    if (!string.IsNullOrEmpty(ValueProperty))
                    {
                        if (typeof(EnumerableQuery).IsAssignableFrom(view.GetType()))
                        {
                            SelectedItem = view.OfType<object>().Where(i => object.Equals(GetItemOrValueFromProperty(i, ValueProperty), value)).FirstOrDefault();
                        }
                        else
                        {
                            SelectedItem = view.AsQueryable().Where(DynamicLinqCustomTypeProvider.ParsingConfig, $@"{ValueProperty} == @0", value).FirstOrDefault();
                        }
                    }
                    else
                    {
                        selectedItem = internalValue;
                    }

                    SetSelectedIndexFromSelectedItem();
                }

Error I am receiving

Methods on type 'Object' are not accessible (at index 7)
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseMemberAccess(Type type, Expression expression, String id)
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseTypeAccess(Type type, Boolean getNext)
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseIdentifier()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParsePrimaryStart()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParsePrimary()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseUnary()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseArithmetic()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseAdditive()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseShiftOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseComparisonOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLogicalAndOrOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseIn()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseAndOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseOrOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLambdaOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseNullCoalescingOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseConditionalOperator()
   at System.Linq.Dynamic.Core.Parser.ExpressionParser.Parse(Type resultType, Boolean createParameterCtor)
   at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(Type delegateType, ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values)
   at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values)
   at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(ParsingConfig parsingConfig, Boolean createParameterCtor, Type itType, Type resultType, String expression, Object[] values)
   at System.Linq.Dynamic.Core.DynamicQueryableExtensions.Where(IQueryable source, ParsingConfig config, String predicate, Object[] args)
   at System.Linq.Dynamic.Core.DynamicQueryableExtensions.Where[TSource](IQueryable`1 source, ParsingConfig config, String predicate, Object[] args)
   at Radzen.DropDownBase`1.SelectItemFromValue(Object value)
   at Radzen.DropDownBase`1.OnParametersSetAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Radzen.RadzenComponent.SetParametersAsync(ParameterView parameters)
   at Radzen.DataBoundFormComponent`1.SetParametersAsync(ParameterView parameters)
   at Radzen.DropDownBase`1.SetParametersAsync(ParameterView parameters)
   at Radzen.Blazor.RadzenDropDown`1.SetParametersAsync(ParameterView parameters)

Hi @Gilly,

We have released a few updates which should enable back object.Equals and the like. Have you tried with the latest version of the Radzen.Blazor library? If yes and the problem still exists can you reproduce it in some of our online demos?

I was only on 5.8.0, I upgraded to 5.9.6 and after I upgraded my whole project will not load. See error below.

An unhandled exception occurred while processing the request.
MissingMethodException: Method not found: 'Void System.Linq.Dynamic.Core.ParsingConfig.set_AllowEqualsAndToStringMethodsOnObject(Boolean)'.
Radzen.RadzenComponent..cctor()

TypeInitializationException: The type initializer for 'Radzen.RadzenComponent' threw an exception.
Radzen.RadzenComponent..ctor()

TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeType.CreateInstanceDefaultCtor(bool publicOnly, bool wrapExceptions)

The authors of this library may have released something broken. Try using System.Linq.Dynamic.Core 1.6.0 - it should work as expected. This property is still in the source though: System.Linq.Dynamic.Core/src/System.Linq.Dynamic.Core/ParsingConfig.cs at master · zzzprojects/System.Linq.Dynamic.Core · GitHub

FWIW I've logged an issue Is 1.6.1 broken somehow? · Issue #892 · zzzprojects/System.Linq.Dynamic.Core · GitHub - just upgrading the reference in from 1.6.0 to 1.6.1 makes our code no longer compile.

It seems there is no such version 1.6.1 being released - the latest version is 1.6.0.1 and it doesn't seem to cause this problem. Try using it instead.

UPDATE: Is 1.6.1 broken somehow? · Issue #892 · zzzprojects/System.Linq.Dynamic.Core · GitHub There was 1.6.1 after all but it was broken and unlisted.

Confirmed that did fix all my issues once I downgraded System.Linq.Dynamic.Core to 1.6.0.1, greatly appreciated!

I see you also spoke about the System.Linq.Dynamic.Core 1.6.1 showing in nuget I saw that same thing and that's what I had installed so not sure what that's about.