微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法卸载MySql连接器净6.9.3,在MySql.Web.v20.dll失败

Env:Windows 7和8.1,均为x64

我无法卸载MysqL Connector.Net或安装更新。 我看着错误日志,并在这个时候发生故障。

Uninstalling assembly 'C:Program Files (x86)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.Web.v20.dll'. Affected parameters are: logtoconsole = logfile = C:Program Files (x86)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.Web.v20.InstallLog assemblypath = C:Program Files (x86)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.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)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.Web.v20.dll'. Affected parameters are: logtoconsole = logfile = C:Program Files (x86)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.Web.v20.InstallLog assemblypath = C:Program Files (x86)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.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失败。

Oracle将这个文件放在:

检测附加的分析器

如何从64位应用程序使用C#代码获取32位应用程序数据文件

使用windbgdebugging.NET转储

强制.NET的Windows应用程序。 以英文forms显示数字

不能修改registry(或运行pipe理员级命令)作为pipe理员在C#中

C: WINDOWS Microsoft.NET assembly GAC_MSIL MysqL.Web v4.0_6.9.3.0__c5687fc88969c44d

这个文件夹包含这些文件

MysqL.Web.dll MysqL.Web.dll.old MysqL.Web.v20.dll

我看到一个post使用包pipe理器,它可以将库安装到项目中。 这是一种解决方法,但是这并不能解决如何卸载Oracle的MysqL Connector .Net的问题

关键是:

System.NullReferenceException: Object reference not set to an instance of an object.

这会告诉我,安装程序试图find一些东西,但失败了。

对于所有好奇的人,使用“mysql-connector-net-6.9.3.msi”修复安装,然后使用MSI卸载安装失败,并显示相同的错误消息。

注意:可以使用以下行获取详细的日志:

C:> C:UsersMeDownloadsmysql-connector-net-6.9.3.msi /lvx* C:UsersMeDownloadsmysql-connector-net-6.9.3-uninstall.log

在以下文件中发生失败:

MSI (s) (3C:AC) [15:24:20:167]: Executing op: CustomActionSchedule(Action=ManagedWebUnInstall,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="C:WindowsMicrosoft.NETFrameworkv4.0.30319installUtil.exe" /LogToConsole=false /LogFile= /u "C:Program Files (x86)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.Web.v20.dll")

对于所有那些没有MSI的旧版本并希望得到重命名的原始版本的人,那么您可以在类似于registry的path中find:

ComputerHKLMSOFTWAREMicrosoftwindowscurrentVersionInstalleruserDataS-1-5-18Products0B758472CF889E4383C13AC77DFAD59InstallProperties

我发现一些文章谈到解决scheme是从pipe理员启动一个命令提示符运行卸载。 没有骰子!

我做了,先执行特定的卸载命令后首先执行修复操作(通过pipe理命令提示符)。

"C:WindowsMicrosoft.NETFrameworkv4.0.30319installUtil.exe" /LogToConsole=true /u "C:Program Files (x86)DevelopmentDatabaseMysqLMysqL Connector Net 6.9.3Assembliesv2.0MysqL.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连接器networking6.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 logfile = C: Program Files文件(x86) Development Database MysqL MysqL连接器networking6.9.3 Assemblies v2.0 MysqL.Web.v20.InstallLog程序集path= C: Program文件(x86) Development Database MysqL MysqL连接器networking6.9.3 Assemblies v2.0 MysqL.Web.v20.dll在卸载MysqL.Web.Security.CustomInstaller安装程序期间发生exception。 System.NullReferenceException:未将对象引用设置为对象的实例。 卸载时发生exception。 这个例外将被忽略,卸载将继续。 但是,卸载完成后,应用程序可能没有完全卸载。

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.

基本上,问题出在自定义安装程序的卸载。

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

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.webprofileproviders> 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.

很明显,这个问题可以追溯到几年,是间歇性的。 甲骨文/ MysqL团队没有采取任何措施来解决这个问题,我是可怜的灵魂,在两台机器上遇到了这个问题。

其他链接

在Oracle解决scheme上发布

在MSDN上不太有用的回应

如何在Windows中运行应用程序?

MMC证书在哪里pipe理“服务帐户”的导入证书?

服务在手动停止后自动重新启动

在.NET中的任务栏中右键单击应用程序菜单

在同一个应用程序中启动两个Windows服务

为了后代或其他任何有可能遇到这个问题的人,下面是解决办法:

问题是两台本地机器上的machine.config文件。 该文件没有适当的条目或任何困扰安装程序。

我比较了机器的machine.config文件,我可以安装/卸载失败的机器,并设置与MysqL不同的行,然后再次尝试卸载(或在W81上安装/卸载)。 成功!

这个问题真的让我陷入了一个循环。 安装程序不应该对该文件非常敏感。 错误信息有点错误,因为失败不是DLL而是machine.config

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐