Since we are starting the migration from .net4 to .net6, I have migrated the library we are using.
I was able to successfully fix all of the exceptions except one.
In my invoke code activity when I try to call System.Text.CodePagesEncodingProvider.Instance the compilation error occurs stating that the CodePagesEncodingProvider is not a member of System.Text
For some reason, There is some case that System.Text.CodePagesEncodingProvider is not available in InvokeCode. So can you try to call it using InvokeMethod before the InvokeCode?
It will be also effective inside InvokeCode activity.
You should be able to use System.Text.CodePagesEncodingProvider.Instance inside the Invoke Code as long as you use it before the Invoke Code first, e.g. in an Assign statement or as an In Argument.
So the thing is that in .Net 6.0 you need to initialize the CodePagesEncodingProvider instance with invoke method or with variable. Otherwise the dll will not be recognized at the runtime, huh?