Bug #87101 Strong named assemblies without provided private key in repository
Submitted: 17 Jul 2017 22:00 Modified: 18 Jul 2017 17:00
Reporter: Laurents Meyer (OCA) Email Updates:
Status: Not a Bug Impact on me:
Category:Connector / NET Severity:S2 (Serious)
Version: OS:Any
Assigned to: CPU Architecture:Any

[17 Jul 2017 22:00] Laurents Meyer
By strong naming the assemblies and then omitting the private key in the repository, it is hard for the community to contribute high quality code.

For example, it would be necessary to remove all strong name configurations ("VisibleTo" etc.) and recompile the assemblies just to run some of the unit tests ("MySql.EntityFramework6.Basic.Tests" for example), which is a pain in the ass, and therefore potentially harmful when unit tests and thus code quality are depending on it.

It is also a bad idea, if you want to roll out your own version of the libraries to quickly fix a bug, because it could force you to reconfigure and recompile every dependency.

How to repeat:
Fetch any of the later commits, make sure the private key "ConnectorNet.snk" is missing (if not delete/rename it) and try to run some unit tests that reference other components ("MySql.EntityFramework6.Basic.Tests" for example).

Suggested fix:
There is a long and thorough discussion about this subject in this thread (though for connector-net, the main issue are the tests):


To summarize as much as possible, it quotes this Microsoft article:


From the article:
"Do not rely on strong names for security. They provide a unique identity only."

"If you are an open-source developer and you want the identity benefits of a strong-named assembly, consider checking in the private key associated with an assembly into your source control system."

So I suggest to either not sign the assemblies at all, or at least to add the private key to the repository.
[18 Jul 2017 17:00] Roberto Ezequiel Garcia Ballesteros

In order to compile the projects, we provided a public key to create a delayed or partial signing assembly:


Unfortunately to run the tests you need a full-signed assembly, but you can disable the strong name validation:


I do not recommend to do this in a production environment and it’s always a good practice to re-enable the strong name validation after finishing your tests.