2015-03-02 89 views
0

信封失败:Windows 7和8.1,两个不同的x64无法卸载MySQL连接的.Net 6.9.3,在MySql.Web.v20.dll

我无法卸载的MySQL Connector.Net或安装更新。我查看了错误日志,并在此时发生故障。

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失败。

甲骨文将此文件在:

C:\ WINDOWS \ Microsoft.NET \装配\ GAC_MSIL \ MySql.Web \ v4.0_6.9.3.0__c5687fc88969c44d

此文件夹包含以下文件:

MySql.Web.dll 
MySql.Web.dll.old 
MySql.Web.v20.dll 

我看到一篇文章使用包管理器,它可以将库安装到项目中。这是一种一个变通的,但这并不解决如何卸载问题Oracle的MySQL连接的.Net

重点线是:

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

那会告诉我,安装程序试图找到一些但失败了。

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

注:

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 

故障发生在该文件中的:

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并希望得到重新命名的原始文件,然后您可以找到类似于注册表中的路径:

Computer\HKLM\SOFTWARE\Microsoft\Windows\currentVersion\Installer\userData\S-1-5-18\Products\00B758472CF889E4383C13AC77DFAD59\InstallProperties 

我发现一些文章谈论的解决方案是从管理员启动命令提示符运行卸载。没有骰子!

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

"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 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连接器网络6.9.3 \ Assemblies \ v2.0 \ MySql.Web.v20.dll 在卸载MySql期间发生异常。 Web.Security.CustomInstaller安装程序。 System.NullReferenceException:未将对象引用设置为对象的实例。 卸载时发生异常。这个例外将被忽略,卸载将继续。但是,卸载完成后,应用程序可能未完全卸载。

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's site上找到了一篇文章,其中提到可能是machine.config文件的一个链接,并提到了一些有趣的内容,请参阅this response。这是一个复制和粘贴。

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团队没有采取任何措施解决这个问题,而我是可怜的灵魂,他在两台机器上遇到了这个问题。

其它链接

Posting on Oracle w/solution

Less useful response on MSDN

回答

0

为子孙后代着想或其他任何人,未来可能会遇到这个问题,这里是修复:

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

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

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

+0

你说的这个machine.config文件在哪里? – bunggo 2015-10-21 19:10:45

+0

此StackOverflow问题对于32位和64位系统都有您的答案。 http://stackoverflow.com/questions/2325473/where-is-machine-config。 – 2015-10-21 21:11:59

+0

我有完全相同的问题。在bugs.mysql上跟随Gabriela的所有对话,但仍然存在问题。 – Amir978 2017-06-25 02:59:01