-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to deploy mySqlConnector with my application #1478
Comments
You need to "nuget" System.Runtime.CompilerServices.Unsafe Make sure to copy the .dll where your app is deployed. |
Hello @tcsaddul and thank you for your answer. |
Make sure that your application has the privilege (manifest) to access the folder and the version of the .dll is the same. Also make sure the declaration in the exe.config are the same version or remove the line. |
Sounds like a binding redirect issue; see my answer (for a different assembly) here (and follow similar steps): #1139 (comment). |
@tcsaddul , Hello @bgrainger and thank you for your messages, I will try the Binding Redirect option on Mondays and will get back as soon as possible. |
HI,
for 2 weeks I have been trying to move from MySql.Data to MySqlConnector for .NET, the program works correctly on the development machine (Visual Studio 2022) but once deployed it does not work and I receive this exception:
Unable to load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The specified file can not be found.
Development OS: Windows 10 Pro 22H2
Deployment OS: Windows 10 Pro 22H2 and 1607
MariaDB Server 10.5.13
The System.Runtime.CompilerServices.Unsafe file is present in the application folder on all machines.
Also, the same application using mysql.data works correctly on all computers.
I also deleted MySql.Data.dll from the application folder but I still got the same result.
I also changed the version of my MariaDB Server to version 10.11 but no results while version 10.5.13 works without problems on my development computer.
Please, could you help me?
The text was updated successfully, but these errors were encountered: