Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CustomTypeProvider Initialization Error with System.Linq.Dynamic.Core v1.4.0+ #621

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

falvarez1
Copy link
Contributor

Issue:

When a project that has a dependency on RulesEngine also includes a dependency on System.Linq.Dynamic.Core with version >= 1.4.0, calling the RulesEngine.ExecuteAllRulesAsync() method fails with the following error:

Exception while parsing expression 'someExpressionHere' - Method not found: 'Void System.Linq.Dynamic.Core.CustomTypeProviders.DefaultDynamicLinqCustomTypeProvider..ctor(Boolean)'.

Cause:

Version 1.4.0 introduced a breaking change to the DefaultDynamicLinqCustomTypeProvider constructor. This change is detailed here: https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/807/files#diff-59a013aa11deb1923983dd1185ff649c2c327d2841621d18dff2991ebbef6d6dR30

Fix:

To resolve this issue, pass ParsingConfig.Default to the constructor.

@falvarez1
Copy link
Contributor Author

falvarez1 commented Jul 24, 2024 via email

@YogeshPraj YogeshPraj merged commit 1c78e23 into microsoft:main Aug 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants