MiloZoe 0 Posted August 17 Hello, can you help me solve a C# MySQL connection problem? The error is as follows: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not load type 'System.Security.PermissionSet' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral , PublicKeyToken=b77a5c561934e089'. At MySql.Data.MySqlClient.MySqlConnection.AssertPermissions() At MySql.Data.MySqlClient.MySqlConnection.Open() At GameMode.ResourceStart() --- End of inner exception stack trace --- At System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) At System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) At GTANetworkInternals.ScriptingEngine.InvokeVoidMethod(String method, Object[] args) At System.Collections.Generic.List`1.ForEach(Action`1 action) At GTANetworkInternals.EventHandler.ParseEx(Event _event, ScriptingEngine engine, Object[] arguments) At System.Collections.Generic.List`1.ForEach(Action`1 action) At GTANetworkInternals.GameServer.StartResource(String resourceName, String parent) I used nuget's mysql data and also referenced bootstrapper but it always gives an error. Thank you! Share this post Link to post Share on other sites
On3ManArmy 1 Posted September 9 (edited) Hi, I had the same problem and i solved it by linking the assembly to my project. In my case the route was: C:\Program Files (x86)\MySQL\Connector NET 8.0\Assemblies\v4.5.2\SshNet.Security.Cryptography.dll Right click on Dependencies -> Add new Assembly -> Browse... -> and in my case the Path that i mentioned before. I hope it helped you. Best Regards On3ManArmy Edited September 9 by On3ManArmy 1 Share this post Link to post Share on other sites
Xabi 143 Posted September 9 First of all, this should be posted on https://rage.mp/forums/forum/44-discussion/ Saying that, you need to copy the .dll it's asking for under runtime folder. 1 Share this post Link to post Share on other sites