卸载安装程序时出现问题

Posted

技术标签:

【中文标题】卸载安装程序时出现问题【英文标题】:Problem while uninstalling the setup 【发布时间】:2011-11-21 00:12:48 【问题描述】:

我在 .net framework 3.5 中创建了应用程序并在 .net framework 4.0 中创建了安装项目。我将它安装在具有 vs2010 的机器上。但是在卸载安装程序时,它会出现以下异常-

Error 1001. An exception occurred while uninstalling. This exception will be ignored & the uninstall will continuw. However , the application might not be fully uninstalled after the uninstall is complete. -> Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configration information.

我在设置中添加了一些 .net 2.0 dll 以及 .net 4.0 dll。它是在制造问题吗?但我不认为因为我在更高版本上运行它。那么它是如何抛出错误的呢?

如何解决?

谢谢

【问题讨论】:

您尝试使用 .Net4.0 在 .Net2.0 上运行构建的应用程序对吗? 或者您的应用程序可能使用此类库。 没有。我在 .net4.0 下创建和构建设置 Mixed mode assembly in .NET 4 的可能重复项 @Hans Passant:我处理了您提供的链接。但它仍然抛出错误。 【参考方案1】:

您可以通过将包含以下内容的 .config 文件添加到允许混合模式组装的项目中来解决此问题

这是它想要的“附加配置信息”:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>

【讨论】:

以上是关于卸载安装程序时出现问题的主要内容,如果未能解决你的问题,请参考以下文章

AppScan安装时出现错误1603

运行或调试应用程序时出现问题

解析程序包时出现问题,怎么处理?

重新安装 Advanced Rest 客户端时出现问题

开机时出现【没有找到libprotobuf.dll,因此这个程序未能启动。重新安装应用程序可能会修复此问题。】

在 Vista/Win 7 上卸载链式 msi 时出现错误 1730(需要管理员权限)