Env: Windows 7 and 8.1, both x64
I am unable to uninstall MySql Connector.Net or install the update. I looked at the error log and failure occurs at this juncture.
Uninstalling assembly 'C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll'.
Affected parameters are:
logtoconsole =
logfile = C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.InstallLog
assemblypath = C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll
An exception occurred during the uninstallation of the MySql.Web.Security.CustomInstaller installer.
System.NullReferenceException: Object reference not set to an instance of an object.
An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete.
Uninstalling assembly 'C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll'.
Affected parameters are:
logtoconsole =
logfile = C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.InstallLog
assemblypath = C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll
An exception occurred during the uninstallation of the MySql.Web.Security.CustomInstaller installer.
System.NullReferenceException: Object reference not set to an instance of an object.
An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete.
Basically, the uninstall of MySql.Web.v20.dll fails.
Oracle places this file at:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\MySql.Web\v4.0_6.9.3.0__c5687fc88969c44d
This folder contains these files:
MySql.Web.dll
MySql.Web.dll.old
MySql.Web.v20.dll
I did see a post to use package manager, which can install the library into project. That is a sort of a work around, but that does not resolve the issue of how to uninstall Oracle's MySql Connector .Net
The key line is:
System.NullReferenceException: Object reference not set to an instance of an object.
That would tell me that the installer tried to find something but failed.
For all who are curious, repairing the installation using "mysql-connector-net-6.9.3.msi", which completes successfully, and then using the MSI to remove the installation fails with the same error message.
Note: One can get the detailed log using the following line:
C:\> C:\Users\Me\Downloads\mysql-connector-net-6.9.3.msi /lvx* C:\Users\Me\Downloads\mysql-connector-net-6.9.3-uninstall.log
Failure occurred in that file at:
MSI (s) (3C:AC) [15:24:20:167]: Executing op: CustomActionSchedule(Action=ManagedWebUnInstall,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="C:\Windows\Microsoft.NET\Framework\v4.0.30319\installUtil.exe" /LogToConsole=false /LogFile= /u "C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll")
For all those that do not have an older copy of the MSI and would like to get the renamed original one, then you can find that at a path similar to in the registry:
Computer\HKLM\SOFTWARE\Microsoft\Windows\currentVersion\Installer\userData\S-1-5-18\Products\00B758472CF889E4383C13AC77DFAD59\InstallProperties
I found a few articles talking about the solution being to run the uninstall from the admin launch of a command prompt. No dice!
I did, execute the specific uninstall command AFTER first executing a repair operation (through the admin command prompt).
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\installUtil.exe" /LogToConsole=true /u "C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll"
The output was: The uninstall is beginning. See the contents of the log file for the C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll assembly's progress. The file is located at C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.InstallLog. Uninstalling assembly 'C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll'. Affected parameters are: logtoconsole = true logfile = C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.InstallLog assemblypath = C:\Program Files (x86)\Development\Database\MySQL\MySQL Connector Net 6.9.3\Assemblies\v2.0\MySql.Web.v20.dll An exception occurred during the uninstallation of the MySql.Web.Security.CustomInstaller installer. System.NullReferenceException: Object reference not set to an instance of an object. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete.
The uninstall has completed.
An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete.
Basically, the problem is in the uninstall of the custom installer.
I found an article on Oracle's site, which mentions possibly a link to the machine.config file and that mentioned something interesting, see this response. Here is a copy and paste.
I went deeper and analyzed MySql.Web.Security.CustomInstaller.RemoveProfileProvider from connector C# code. Following code is not properly checked:
XmlNodeList nodes = doc.GetElementsByTagName ("profile");
XmlNode providersNode = nodes [0].FirstChild;
foreach (XmlNode node in providersNode.ChildNodes)
{
string name = node.Attributes ["name"].Value;
if (name == "MySQLProfileProvider")
{
This code expects every XML node below machine.config's <system.web\profile\providers> to have "name" attribute. Otherwise it crashes. It was happening to me, cause I had <clear /> node there (which doesn't make much sense in machine.config, but is valid).
In general .NET Connector installer is very sensitive of machine.config files, which comes from MySql.Web.Security.CustomInstaller class.
Obviously, this problem goes back years and is intermittent. Oracle/MySQL team have done nothing to fix this problem, and I was the poor soul, who ran into this problem on two machines.
Other Links: