Since upgrading to UiPath 2024, I'm getting 'BC30456: 'CodePagesEncodingProvider' is not a member of System.Text.' on some code

Hey,

As the title explains, we recently upgraded to UiPath 2024 and since then I’m getting a validation error on some invoke code: BC30456: ‘CodePagesEncodingProvider’ is not a member of System.Text.

This code was working before and was imply a method to remove ‘accented’ characters to match a value.

I’ve searched the forums and seen that people have had this in the past, however, the solutions I’ve tried from those threads seem to run into errors of their own with the 2024 version.

Could anyone please help me fix this? Thank you!

2 Likes

Hi add below namespace in import.

System.Text.Encoding.CodePages

Thanks,

2 Likes

Hey, how do I do this? In the past, I went to imports, entered the text and hit enter, but nothing happens when I do this here?

2 Likes

Hi

Check target type System.Text.Encoding

Workflow

Direction Type Value
In EncodingProvider System.Text.CodePagesEncodingProvider.Instance
2 Likes

Hi @dr1992 ,

If it doesn’t load, close your Studio, open the project’s JSON file, add the JSON value below, and then open the project via the JSON file.

"excludedAssemblies": [
    "System.Text.Encoding.CodePages"
]

Thanks,

2 Likes

This was resolved by just adding ‘System.Text’ only to imports.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.