MiloZoe Posted August 17, 2019 Posted August 17, 2019 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!
On3ManArmy Posted September 9, 2019 Posted September 9, 2019 (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, 2019 by On3ManArmy 1
Xabi Posted September 9, 2019 Posted September 9, 2019 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now