il2cpp+mysql error
Hello. I get an exception when building il2cpp + MySql.Data . How to solve it?
Error:
NotSupportedException: System.Configuration.ConfigurationManager::GetSection at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in :0 at MySql.Data.MySqlClient.MySqlConfiguration..cctor () [0x00000] in :0 at MySql.Data.MySqlClient.Replication.ReplicationManager..cctor () [0x00000] in :0 at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] in :0 at Server.Start () [0x00000] in :0 Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.MySqlConfiguration' threw an exception. at MySql.Data.MySqlClient.Replication.ReplicationManager..cctor () [0x00000] in :0 at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] in :0 at Server.Start () [0x00000] in :0 Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception. at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] in :0 at Server.Start () [0x00000] in :0
(Filename: currently not available on il2cpp Line: -1)
I have a similar issue, but I switched to mono from il2cpp. In the editor, it works fine. However, in the build I get the error below. What I am not understanding is why, as at one point I was able to build and the only issue was the password was rejected by the server. It turned out the issue was actually with the account, but now I cannot seem to get it back to connecting in a build.
PlatformNotSupportedException: Operation is not supported on this platform. at $$anonymous$$ySql.Data.$$anonymous$$ySqlClient.$$anonymous$$ySqlConfiguration..cctor () [0x00000] in :0 Rethrow as TypeInitializationException: The type initializer for '$$anonymous$$ySql.Data.$$anonymous$$ySqlClient.$$anonymous$$ySqlConfiguration' threw an exception. at $$anonymous$$ySql.Data.$$anonymous$$ySqlClient.Replication.Replication$$anonymous$$anager..cctor () [0x0001e] in :0 Rethrow as TypeInitializationException: The type initializer for '$$anonymous$$ySql.Data.$$anonymous$$ySqlClient.Replication.Replication$$anonymous$$anager' threw an exception. at $$anonymous$$ySql.Data.$$anonymous$$ySqlClient.$$anonymous$$ySqlConnection.Open () [0x0016f] in :0 at SqlWrapper.OpenConnection () [0x000e3] in :0 at SqlWrapper.ServerRoomDataExists (System.String localName, System.String infoName, System.String setName) [0x0000d] in :0 at SceneLoadFunctions.b__41_0 () [0x00033] in :0 at Host$$anonymous$$enuScreen.OnRender () [0x006af] in :0 at $$anonymous$$enuScreen.ProcessRender () [0x00012] in :0 at SceneLoadFunctions.OnGUI () [0x00088] in :0
$$anonymous$$y point being that I know it can be done. I just need to find the settings that it worked with before.
Answer by JoshPeterson · Mar 26, 2019 at 06:37 PM
Unfortunately the ConfigurationManager
class is not supported with IL2CPP. So I don't believe that this will work.
Hi @JoshPeterson, why Configuration$$anonymous$$anager class is not supported with IL2CPP?
The Configuration$$anonymous$$anager
class pulls in a bunch of managed code. So this is really a trade-off between code size and functionality. We decided that the increased code size was not worth the functionality provided.
Is there any official document talked about what classes are not supported by IL2CPP? I have tried to google it, but only found information here.
Answer by dhitz666 · May 17, 2020 at 01:56 PM
mysql.data.mysqlclient.dll mono .NET 4 build android its work perfect on android device. login form
but if change mono to IL2CPP and install to android device I cant login
Have you found a solution to the problem?
Your answer
Follow this Question
Related Questions
Buliding Android Game | Exception - il2cpp.exe did not run properly 0 Answers
build with IL2CPP error unity 4.6.9 while making iOS build 1 Answer
Windows Standalone and MySQL: NotSupportedException 0 Answers
Could not load file or assembly 'Facebook.Unity.Gameroom' Exception occurs on IL2CPP build. 1 Answer
method body replaced by unityLinker.exe with a notsupportedexception 1 Answer