无法卸载MySql Connector .Net 6.9.3,MySql.Web.v20.dll失败 [英] Cannot Uninstall MySql Connector .Net 6.9.3, failure at MySql.Web.v20.dll

查看:132
本文介绍了无法卸载MySql Connector .Net 6.9.3,MySql.Web.v20.dll失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Env:Windows 7和8.1,均为x64

Env: Windows 7 and 8.1, both x64

我无法卸载MySql Connector.Net或安装更新.我查看了错误日志,此刻出现了故障.

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.

基本上,MySql.Web.v20.dll的卸载失败.

Basically, the uninstall of MySql.Web.v20.dll fails.

Oracle将此文件放置在:

Oracle places this file at:

C:\ Windows \ Microsoft.NET \ assembly \ GAC_MSIL \ MySql.Web \ v4.0_6.9.3.0__c5687fc88969c44d

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

我确实看到了使用软件包管理器的文章,该文章可以将库安装到项目中.这是一种变通方法,但是并不能解决如何卸载Oracle MySql Connector .Net

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

关键行是:

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.

对于所有好奇的人,使用成功完成的"mysql-connector-net-6.9.3.msi"修复安装,然后使用MSI删除安装失败,并显示相同的错误消息.

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")

对于所有没有较旧版本的MSI并希望获得重命名的原始版本的用户,则可以在类似于注册表的路径中找到它:

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!

我做到了,先执行特定的卸载命令,然后再执行修复操作(通过admin命令提示符).

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"

输出为: 卸载开始. 请参阅日志文件的内容,以获取C:\ Program Files(x86)\ Development \ Database \ MySQL \ MySQL Connector Net 6.9.3 \ Assemblies \ v2.0 \ MySql.Web.v20.dll程序集的进度. 该文件位于C:\ Program Files(x86)\ Development \ Database \ MySQL \ MySQL Connector Net 6.9.3 \ Assemblies \ v2.0 \ MySql.Web.v20.InstallLog. 卸载程序集'C:\ Program Files(x86)\ Development \ Database \ MySQL \ MySQL Connector Net 6.9.3 \ Assemblies \ v2.0 \ MySql.Web.v20.dll'. 受影响的参数是: logtoconsole = true 日志文件= 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 MySql.Web.Security.CustomInstaller安装程序的卸载过程中发生异常. System.NullReferenceException:对象引用未设置为对象的实例. 卸载时发生异常.该异常将被忽略,卸载将继续.但是,卸载完成后,该应用程序可能无法完全卸载.

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.

我在 Oracle网站上找到了一篇文章,其中可能提到了链接到machine.config文件,其中提到了一些有趣的内容,请参见此响应.这是复制和粘贴.

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.

很明显,这个问题可以追溯到几年前,并且是断断续续的. Oracle/MySQL团队没有采取任何措施来解决此问题,我是可怜的灵魂,他在两台计算机上遇到了这个问题.

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.

其他链接:

通过解决方案在Oracle上发布

在MSDN上缺少有用的响应

推荐答案

出于后代或其他可能有一天遇到此问题的人,这里是解决方法:

For posterity sake or anyone else that might one day run into this problem, here is the fix:

问题是两个本地计算机上的machine.config文件.该文件没有正确的条目,或者使安装程序感到困惑.

The problem was the machine.config file on both local machines. The file did not have the proper entries or whatever it had confused the installer.

我比较了机器上的machine.config文件,可以在其中安装/卸载到发生故障的计算机,并设置与MySql不同的行,然后继续尝试进行卸载(或在W81上进行安装/卸载) ) 再次.成功!

I compared the machine.config file from a machine, where I could install/uninstall to the failed machines and set the lines that were different with respect to MySql, and then proceeded to try the uninstall (or install/uninstall on W81) again. Success!

这个问题确实让我陷入困境.安装程序不应对该文件那么敏感.该错误消息有点错误,因为该故障不是DLL,而是machine.config.

This problem really threw me for a loop. The installer should not be so sensitive to that file. The error message was a bit faulty, as the failure was not the DLL but rather the machine.config.

这篇关于无法卸载MySql Connector .Net 6.9.3,MySql.Web.v20.dll失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆