Bug #58039 .Net Connector 6.3.5 not compiling
Submitted: 8 Nov 2010 0:12 Modified: 9 Jun 2011 22:07
Reporter: Adriano Oliveira Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Tony Bedford CPU Architecture:Any

[8 Nov 2010 0:12] Adriano Oliveira
Description:
Hello everyone!

I have downloaded the .Net Connector for MySQL 6.3.5 source code.
We have Visual Studio 2010 and SDK installed on our machines.
We are trying to open the source code solution () and compile it.
But a lot of errors are ocurring:

The first (when opening the solution):
Installer\Installer.VS2010.wixproj cannot be opened because its project type (.wixproj) is not supported by this version of the application.

The others (compiling):
Error	18	Could not load referenced assembly "C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\bin\Debug\MySql.Data.dll".  Caught a FileNotFoundException saying "Could not load file or assembly 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\bin\Debug\MySql.Data.dll' or one of its dependencies. The system cannot find the file specified.".	C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Web\Providers\ResGen	MySql.Web
Error	1	Cryptographic failure while signing assembly 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\obj\Debug\MySql.Data.dll' -- 'The key container name 'ConnectorNet' does not exist'	MySql.Data
Error	13	Error 175: The specified store provider cannot be found in the configuration, or is not valid.	C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data.Entity\Tests\Model1.edmx	7	26	MySql.Data.Entity.Tests.VS2010
Error	14	Error 175: The specified store provider cannot be found in the configuration, or is not valid.	C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data.Entity\Tests\TestModel.edmx	7	221	MySql.Data.Entity.Tests.VS2010
Error	17	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data.Entity\Provider\bin\Debug-4.0\MySql.Data.Entity.dll' could not be found	MySql.Data.Entity.Tests.VS2010
Error	7	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\bin\Debug\MySql.Data.dll' could not be found	MySql.Data.Tests
Error	8	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\bin\Debug\MySql.Data.dll' could not be found	MySql.Data.Entity.VS2010
Error	9	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\bin\Debug\MySql.Data.dll' could not be found	MySql.VisualStudio.VS2010
Error	11	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\bin\Debug\MySql.Data.dll' could not be found	MySql.Web.Tests
Error	16	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Provider\bin\Debug\MySql.Data.dll' could not be found	MySql.Data.Entity.Tests.VS2010
Error	10	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Tests\bin\Debug\MySql.Data.Tests.dll' could not be found	MySql.Web.Tests
Error	15	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Data\Tests\bin\Debug\MySql.Data.Tests.dll' could not be found	MySql.Data.Entity.Tests.VS2010
Error	12	Metadata file 'C:\Projects\Test\MySQL Connector .Net 6.3.5 Source code\MySql.Web\Providers\bin\Debug\MySql.Web.dll' could not be found	MySql.Web.Tests

Kind regards,

Adrian

How to repeat:
Compile the supplied source code with Visual Studio 2010 under Windows 7 Ultimate
[8 Nov 2010 8:17] Tonci Grgin
Hi Adriano and thanks for your report.

I see no bug here but rather it's a doc request to make http://dev.mysql.com/doc/refman/5.5/en/connector-net-installation-source.html usable. So I'm assigning docs team.
[27 Dec 2010 10:43] Tanguy Gilmont
You get this error because the assembly needs signing.

In order to do that,
1) open the project properties (in this case, MySql.Data properties),
2) open the "Signing" tab in the property window,
3) check the "Sign the assembly" option,
4) either choose a strong name key file, or make a new one for test purposes (you can simply type in a new key filename without password).

Then you can compile the project again, this time it should succeed.
[27 Dec 2010 11:07] Tanguy Gilmont
For the first error, you obviously need to install the WiX Toolset, and if you are using VisualStudio 2010 you will need version 3.5 (which is currently not stable but good enough).

http://wix.codeplex.com/

For some reason I'm getting errors with that one, but this is only to build the installer so it is not really important for testing / debugging the connector.
[19 Oct 2011 20:46] Simi Sreedharan
To solve this error do the following.

1) Run VS 2010 in Administrator mode (Right click VS 2010, Run as Administrator)
2) Sign your assembly (Right click assembly, Properties, Signing, Check Sign Assembly, From drop down select new, Enter strong name, uncheck password)
3) Rebuild assembly. (If did not succeed, please close solution and restart VS2010 in admin mode)