Bug #97023 Cannot install mysql-connector-net-8.0.17
Submitted: 26 Sep 2019 0:04 Modified: 5 Nov 2019 14:41
Reporter: Javier Alpizar Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:8.0.17 OS:Windows (Win 10 Education build 1803)
Assigned to: CPU Architecture:x86 (X64)
Tags: Connector Install Windows

[26 Sep 2019 0:04] Javier Alpizar
Description:
- Tried to install Mysql Connector for .NET, from stand-alone installer (mysql-connector-net-8.0.17.msi) and also integrated installer (mysql-
installer-web-community-8.0.17.0.msi)

- Server and workbench has been installed without issues and running smooth....

- Machine: Windows 10 Education, VS 2017 and 2019 Enterprise, Updated .NET 4.

Full installation log attached:

Noticed this message (Object reference not set to instance of an object):

MSI (s) (30!84) [17:35:38:604]: Creating MSIHANDLE (50) of type 790531 for thread 9092
System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
   en MySql.ConnectorInstaller.WebCustomAction.AddSiteMapProvider(XmlDocument doc)
   en MySql.ConnectorInstaller.WebCustomAction.AddProviderToMachineConfigInDir(String path)
   en MySql.ConnectorInstaller.WebCustomAction.UpdateMachineConfigs(String rootPath, Boolean add)
   en MySql.ConnectorInstaller.WebCustomAction.AddProviderToMachineConfig()
   en MySql.ConnectorInstaller.WebCustomAction.WebInstall(Session session)
MSI (s) (30!84) [17:35:38:604]: Closing MSIHANDLE (50) of type 790531 for thread 9092
CustomAction ManagedWebInstallSetup returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

How to repeat:
Just run both installers and ends with a "Rolling back" and "Installation failed" Message.
[26 Sep 2019 0:09] Javier Alpizar
Verbose mode install log

Attachment: installlog.txt (text/plain), 684.46 KiB.

[5 Nov 2019 14:41] MySQL Verification Team
Thank you for the bug report. Please try 8.0.18 (see https://bugs.mysql.com/bug.php?id=97470).
[17 Jan 2020 14:37] Ben Oshman
I'm having nearly the identical issue with the 8.0.18 installer. Please don't ask me to try 8.0.19 installer.
[17 Jan 2020 14:38] Ben Oshman
msi install log with verbose and debug message

Attachment: install.txt (text/plain), 716.62 KiB.

[9 Mar 2020 19:45] Guy Jackman
I had this same problem.  I couldn't remove the old connector and I couldn't install a new connector version.  Regardless of version.  I had the same error reference but in english.

SFXCA: Binding to CLR version v4.0.30319
Calling custom action MySql.ConnectorInstaller!MySql.ConnectorInstaller.WebCustomAction.WebInstall
System.NullReferenceException: Object reference not set to an instance of an object.
   at MySql.ConnectorInstaller.WebCustomAction.AddSiteMapProvider(XmlDocument doc)
   at MySql.ConnectorInstaller.WebCustomAction.AddProviderToMachineConfigInDir(String path)
   at MySql.ConnectorInstaller.WebCustomAction.UpdateMachineConfigs(String rootPath, Boolean add)
   at MySql.ConnectorInstaller.WebCustomAction.AddProviderToMachineConfig()
   at MySql.ConnectorInstaller.WebCustomAction.WebInstall(Session session)

I was able to fix this by FIRST making a backup of ALL the machine.config files (there should be up to 4 depending on what version(s) of .Net are installed 1 for each combination of 2.0, 4.0, x64, and x32).  On my machine they are all under "C:\Windows\Microsoft.NET".

At this point you have 2 options.  Edit the existing machine.config files to remove all lines containing "mysql", or copy a fresh version of the machine.config from machine.config.default.  Once I cleansed the files of the MySQL references it was able to install/uninstall.  Looking at the non-working versions of the files, I saw multiple version references and also found at least one of the files that had the "<!--add name="MySqlSiteMapProvider" " commented out.  I didn't take the time to determine which was the problem.
[9 Mar 2020 19:48] Guy Jackman
Note in my solution above, if you select the option to replace your machine.config with the machine.config.default, you will most likely lose other settings that have been updated by other installers.  Only use that option if you are sure you know what you are doing.  In all cases, make the backup first.
[28 Dec 2020 9:14] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=102077 marked as duplicate of this one.