- Home /
Azure AD B2C - MissingMethodException: string[] string.Split(char,System.StringSplitOptions) in Microsoft.Identity.Client on Android
Hi all.
I'm attempting to integrate Azure AD B2C into my Unity application which needs to run on Android and have gone some way down the road to (hopefully) getting it working.
Microsoft provide the PublicClientApplication class in Microsoft.Identity.Client which is downloadable as a NuGet package and is provided in a DLL targeting Mono. It integrates perfectly in a Xamarin app and I've got it talking to B2C just to prove this.
Basing my ideas on this configuration I have therefore copied all of the relevant DLL's into my plugin folder in Unity, added an AndroidManifest configuration and built it successfully. However during the construction of the PublicClientApplication object when the app starts it throws an error with the message:
MissingMethodException: string[] string.Split(char,System.StringSplitOptions)
I wasn't at all convinced that Split wouldn't be supported so the line above the instantiation I actually test it in my script like this:
var test = "this should work".Split(' ');
which of course works!
Has anyone got any idea therefore why the imported library seems to be targeting a Mono version which does not support this or if something else is happening here?
I've searched high and low and indeed found that Mono had issues with this but I am definitely targeting .Net 4.x in both Scripting Runtime Version and API Compatibility Level and using Unity 2018.3.6
Thanks to all for any help!
P.S. I'm aware this is similar to this post on the Unity forums but I'm really against building a custom DLL unless absolutely necessary because I would rather be able to directly upgrade whenever Microsoft release new versions of the package.
Your answer
Follow this Question
Related Questions
Use Mono in Unity 1 Answer
Distribute terrain in zones 3 Answers
how to connect to mssql in unity for hololesn (Build Setting Error) 0 Answers
The requested feature is not implemented 0 Answers
Dll call 10x slower in Unity 3 Answers