How do I change the MySQL connector source code and install it on my PC?

In short, what are the steps to take to change the source of the connector and install it on Windows?

I have MySQL Connector / .NET Version 6.1.2 installed on my machine, but I am getting an exception for every DateTime with the value '0000-00-00'. This exception is breaking my application.

As a solution, I downloaded the source code for the connector and modified the exception so that instead of throwing the exception, it returns the date "0001-01-01 00:00:00". Although I was able to change the code and even compile the DLL (NOTE: I commented out the Assembly link on ConnectorNet), I cannot figure out how to install the DLL on my computer. Apparently I can't just replace the DLL in the GAC, because my custom DLL is not strongly typed.

In sum, what are the steps to take to change the connector source and install it on Windows?

Thank.

+2


source to share


2 answers


You need the original secret key.

Aggregates in the GAC have a "strong name" and the encrypted hash is part of that.



Only the owner of the private key can create an assembly with the same public key (digitally signed).

You will need a key pair (.snk or .pfx file) to sign your new DLL, or you will have to recompile the applications that use the DLL.

+1


source


It is not recommended to update the .NET connector. The best reason would be to figure out why the exception is being thrown.



If you get exceptions when trying to insert a 0000-00-00 date, consider shutting down the MySQL NO_ZERO_DATE

server.

+1


source







All Articles