无法再卸载 Visual Studio 2017

2024-04-05

我在运行最新的 VS2017 时遇到了严重的问题,因为在我升级它时它进入了不一致的状态。有一些残留的软件包拒绝卸载,因为它们显然缺少来自的缓存文件C:\Windows\Installer文件夹。我从来没有碰过那个文件夹。然而,我确实移动了C:\ProgramData\Packages Cache和 Visual Studio 文件夹到另一个驱动器使用软连接(mklink /D)

现在,即使卸载 VS2017 后,我也无法重新安装它,因为它立即失败并报告:

The product failed to install the listed workloads and components due to one or more package failures.

Incomplete workloads
    .NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26127.0)
    .NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.0.26206.0)
    ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26206.0)
    Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.0.26206.0)
    Visual Studio core editor (Microsoft.VisualStudio.Workload.CoreEditor,version=15.0.26004.1)

Incomplete components
    .NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.0.26109.1)
    .NET Framework 4.6.1 development tools (Microsoft.Net.ComponentGroup.DevelopmentPrerequisites,version=15.0.26206.0)
    .NET Portable Library targeting pack (Microsoft.VisualStudio.Component.PortableLibrary,version=15.0.26109.1)
    ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26127.0)
    Blend for Visual Studio (Microsoft.ComponentGroup.Blend,version=15.0.26004.1)
    Blend for Visual Studio SDK for .NET (Microsoft.Component.Blend.SDK.WPF,version=15.0.26004.1)
    C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26109.1)
    ClickOnce Publishing (Microsoft.Component.ClickOnce,version=15.0.26004.1)
    Cloud Explorer (Microsoft.VisualStudio.Component.CloudExplorer,version=15.0.26206.0)
    Connectivity and publishing tools (Microsoft.VisualStudio.Component.Common.Azure.Tools,version=1.9.170119.3)
    Container development tools (Microsoft.VisualStudio.Component.DockerTools,version=15.0.26206.0)
    Data sources and service references (Microsoft.VisualStudio.Component.VisualStudioData,version=15.0.26004.1)
    Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26004.1)
    Developer Analytics tools (Microsoft.VisualStudio.Component.AppInsights.Tools,version=15.0.26206.0)
    Entity Framework 6 tools (Microsoft.VisualStudio.Component.EntityFramework,version=15.0.26004.1)
    IIS Express  (Microsoft.VisualStudio.Component.IISExpress,version=15.0.26004.1)
    IntelliTrace (Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd,version=15.0.26004.1)
    JavaScript and TypeScript language support (Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.0.26004.1)
    JavaScript diagnostics (Microsoft.VisualStudio.Component.JavaScript.Diagnostics,version=15.0.26109.1)
    Just-In-Time debugger (Microsoft.VisualStudio.Component.Debugger.JustInTime,version=15.0.26109.1)
    Live Unit Testing (Microsoft.VisualStudio.Component.LiveUnitTesting,version=15.0.26206.0)
    Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.0.26109.1)
    Modeling SDK (Microsoft.VisualStudio.Component.DslTools,version=15.0.26109.1)
    Node.js support (Microsoft.VisualStudio.Component.Node.Tools,version=15.0.26206.0)
    NuGet package manager (Microsoft.VisualStudio.Component.NuGet,version=15.0.26004.1)
    Profiling tools (Microsoft.VisualStudio.Component.DiagnosticTools,version=15.0.26109.1)
    SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.0.26206.0)
    Text Template Transformation (Microsoft.VisualStudio.Component.TextTemplating,version=15.0.26004.1)
    Visual Studio core editor (Microsoft.VisualStudio.Component.CoreEditor,version=15.0.26004.1)
    Visual Studio SDK (Microsoft.VisualStudio.Component.VSSDK,version=15.0.26206.0)
    Web Deploy (Microsoft.VisualStudio.Component.WebDeploy,version=15.0.26004.1)
    WebSocket4Net (Component.WebSocket,version=15.0.26109.1)
    Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.0.26109.1)

You can search for solutions using the information below, modify your selections for the above workloads and components and retry the installation, or remove the product from your machine.

Following is a collection of individual package failures that led to the incomplete workloads and components above. To search for existing reports of these specific problems, please copy and paste the URL from each package failure into a web browser. If the issue has already been reported, you can find solutions or workarounds there. If the issue has not been reported, you can create a new issue where other people will be able to find solutions or workarounds.

Package 'Microsoft.VisualStudio.MinShell.Msi,version=15.0.26206.0' failed to install.
    Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.MinShell.Msi;PackageAction=Install;ReturnCode=1714
    Impacted workloads
        .NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26127.0)
        .NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.0.26206.0)
        ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26206.0)
        Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.0.26206.0)
        Visual Studio core editor (Microsoft.VisualStudio.Workload.CoreEditor,version=15.0.26004.1)
    Impacted components
        .NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.0.26109.1)
        .NET Framework 4.6.1 development tools (Microsoft.Net.ComponentGroup.DevelopmentPrerequisites,version=15.0.26206.0)
        .NET Portable Library targeting pack (Microsoft.VisualStudio.Component.PortableLibrary,version=15.0.26109.1)
        ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26127.0)
        Blend for Visual Studio (Microsoft.ComponentGroup.Blend,version=15.0.26004.1)
        Blend for Visual Studio SDK for .NET (Microsoft.Component.Blend.SDK.WPF,version=15.0.26004.1)
        C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26109.1)
        ClickOnce Publishing (Microsoft.Component.ClickOnce,version=15.0.26004.1)
        Cloud Explorer (Microsoft.VisualStudio.Component.CloudExplorer,version=15.0.26206.0)
        Connectivity and publishing tools (Microsoft.VisualStudio.Component.Common.Azure.Tools,version=1.9.170119.3)
        Container development tools (Microsoft.VisualStudio.Component.DockerTools,version=15.0.26206.0)
        Data sources and service references (Microsoft.VisualStudio.Component.VisualStudioData,version=15.0.26004.1)
        Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26004.1)
        Developer Analytics tools (Microsoft.VisualStudio.Component.AppInsights.Tools,version=15.0.26206.0)
        Entity Framework 6 tools (Microsoft.VisualStudio.Component.EntityFramework,version=15.0.26004.1)
        IIS Express  (Microsoft.VisualStudio.Component.IISExpress,version=15.0.26004.1)
        IntelliTrace (Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd,version=15.0.26004.1)
        JavaScript and TypeScript language support (Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.0.26004.1)
        JavaScript diagnostics (Microsoft.VisualStudio.Component.JavaScript.Diagnostics,version=15.0.26109.1)
        Just-In-Time debugger (Microsoft.VisualStudio.Component.Debugger.JustInTime,version=15.0.26109.1)
        Live Unit Testing (Microsoft.VisualStudio.Component.LiveUnitTesting,version=15.0.26206.0)
        Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.0.26109.1)
        Modeling SDK (Microsoft.VisualStudio.Component.DslTools,version=15.0.26109.1)
        Node.js support (Microsoft.VisualStudio.Component.Node.Tools,version=15.0.26206.0)
        NuGet package manager (Microsoft.VisualStudio.Component.NuGet,version=15.0.26004.1)
        Profiling tools (Microsoft.VisualStudio.Component.DiagnosticTools,version=15.0.26109.1)
        SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.0.26206.0)
        Text Template Transformation (Microsoft.VisualStudio.Component.TextTemplating,version=15.0.26004.1)
        Visual Studio core editor (Microsoft.VisualStudio.Component.CoreEditor,version=15.0.26004.1)
        Visual Studio SDK (Microsoft.VisualStudio.Component.VSSDK,version=15.0.26206.0)
        Web Deploy (Microsoft.VisualStudio.Component.WebDeploy,version=15.0.26004.1)
        WebSocket4Net (Component.WebSocket,version=15.0.26109.1)
        Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.0.26109.1)
    Log
        D:\Users\6587\AppData\Local\Temp\dd_setup_20170215092106_005_Microsoft.VisualStudio.MinShell.Msi.log
    Details
        MSI: C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.MinShell.Msi,version=15.0.26206.0\Microsoft.VisualStudio.MinShell.Msi.msi, Properties:  REBOOT=ReallySuppress ARPSYSTEMCOMPONENT=1  MSIFASTINSTALL="7"  VSEXTUI="1"  VS7.3643236F_FC70_11D3_A536_0090278A1BB8="E:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise" 
        Return code: 1714
        Return code details: The older version of vs_minshellmsi cannot be removed.  Contact your technical support group.

此消息抱怨某个包vs_minshellmsi由于另一个包丢失而没有被删除C:\Windows\Installer。现在,我已经尝试了互联网上提到的许多方法,但我没有任何运气:

  • 试图从第二台运行完美的电脑上找到丢失的文件。那里没有这样的文件
  • 彻底删除VS2017安装程序
  • 运行 VS2017 安装程序只是为了安装 VS20217 安装程序,这样我就可以运行InstallCleanup.exe -full
  • 为 VS2017 创建完整的离线安装点(--layout)并寻找有问题的包

以上都不适合我。现在,我找到了一个 PS 脚本来删除 VS2017 Preview-4 并尝试使用它来解决我的情况,但仍然没有操作:https://gist.github.com/timsneath/9f9e384ef7b986fbcd873e75e4cae7c4 https://gist.github.com/timsneath/9f9e384ef7b986fbcd873e75e4cae7c4

这是脚本:

# Setup assets
$foldersToDelete = ,"$env:ProgramData\Microsoft\VisualStudio\Packages"
$foldersToDelete += "$env:AppData\Microsoft\VisualStudio\Packages"
$foldersToDelete |? { Test-Path $_ } |% { del -rec -for $_ }

# VS assets
#   Any VS installation folders
if (test-path $env:ProgramData\Microsoft\VisualStudio\Packages\_Instances) {
    gci $env:ProgramData\Microsoft\VisualStudio\Packages\_Instances -filter state.json -recurse | gc -raw | convertfrom-json | select -expand installationPath | del -force -recurse
}

if (test-path "${env:ProgramFiles(x86)}\Microsoft Visual Studio") {
    del -rec -for "${env:ProgramFiles(x86)}\Microsoft Visual Studio"
}

del -rec -for $env:localappdata\Microsoft\VisualStudio\15.0*,$env:AppData\Microsoft\VisualStudio\15.0*

reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\ | findstr 15.0 |% { reg delete $_ /f }
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft | findstr VisualStudio_ |% { reg delete $_ /f }
Reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio | findstr 15.0 |% { reg delete $_ /f }

# Remove all VS singletons
# get-package vs_* | uninstall-package
get-package -provider msi | where { $_.name -like "vs_*" } | uninstall-package -additionalArguments "IGNOREDEPENDENCIES=ALL"

我运行了这个脚本,它执行时没有错误和输出。最后一行是我感兴趣的:

PS C:\Windows\system32> get-package -provider msi | where { $_.name -like "vs_*" }

Name                           Version          Source                           ProviderName
----                           -------          ------                           ------------
vs_codecoveragemsi             15.0.26004                                        msi
vs_professionalmsi             15.0.26004                                        msi
vs_BlendMsi                    15.0.26004                                        msi
vs_update3notification         14.0.25431                                        msi
vs_devenvmsi                   15.0.26004                                        msi
vs_filehandler_x86             15.0.26004                                        msi
vs_cuitextensionmsi            15.0.26004                                        msi
vs_minshellinteropmsi          15.0.26004                                        msi
vs_SQLClickOnceBootstrappermsi 15.0.26004                                        msi
vs_tipsmsi                     15.0.26004                                        msi
vs_communitymsires             15.0.26004                                        msi
vs_networkemulationmsi_x64     15.0.26004                                        msi
vs_cuitcommoncoremsi           15.0.26004                                        msi
vs_clickoncebootstrappermsi    15.0.26004                                        msi
vs_minshellmsires              15.0.26004                                        msi
vs_cuitextensionmsi_x64        15.0.26004                                        msi
vs_communitymsi                15.0.26004                                        msi
vs_enterprisemsi               15.0.26004                                        msi
vs_minshellmsi                 15.0.26004                                        msi
vs_clickoncebootstrappermsires 15.0.26004                                        msi
vs_codeduitestframeworkmsi     15.0.26004                                        msi
vs_clickoncesigntoolmsi        15.0.26004                                        msi
vs_filehandler_amd64           15.0.26004                                        msi

我无法摆脱这些包裹。当我运行最后一行时,没有任何反应,我仍然能够过滤这些特定的包。

EDIT

现在还有一些软件包我没有来源并且无法卸载。我需要一种方法来强制删除这些(标有*)

Name                           Version   

vs_networkemulationmsi_x64     15.0.26208
vs_SQLClickOnceBootstrappermsi 15.0.26208
vs_communitymsires             15.0.26228
vs_webtestrecordermsi_x64      15.0.26208
vs_minshellmsi                 15.0.26228
vs_filehandler_amd64           15.0.26228
vs_loadtestexceladdinmsi       15.0.26208
vs_Graphics_Singletonx64       15.0.26208
vs_BlendMsi                    15.0.26004*
vs_update3notification         14.0.25431
vs_cuitcommoncoremsi           15.0.26208
vs_clickoncebootstrappermsires 15.0.26208
vs_minshellmsires              15.0.26228
vs_communitymsi                15.0.26228
vs_codecoveragemsi             15.0.26208
vs_filehandler_x86             15.0.26228
vs_professionalmsi             15.0.26228
vs_cuitextensionmsi            15.0.26208
vs_FileTracker_Singleton       15.0.26208
vs_devenvmsi                   15.0.26208
vs_tipsmsi                     15.0.26208
vs_helpconfigmsi               15.0.26208
vs_clickoncebootstrappermsi    15.0.26208
vs_cuitextensionmsi_x64        15.0.26004*
vs_minshellinteropmsi          15.0.26208
vs_Graphics_Singletonx86       15.0.26208
vs_webtestrecordermsi          15.0.26208
vs_feedbackclientmsi           15.0.26208
vs_enterprisemsi               15.0.26228
vs_codeduitestframeworkmsi     15.0.26004*
vs_clickoncesigntoolmsi        15.0.26208
vs_labtestagentdeployermsi     15.0.26208

在我的 Windows 在安装过程中崩溃后,我遇到了同样的问题,我在 google 上搜索了很多,找到了一个来自微软的工具,可以完全删除 MSI 包。

程序安装和卸载 http://download.microsoft.com/download/7/E/9/7E9188C0-2511-4B01-8B4E-0A641EC2F600/MicrosoftProgram_Install_and_Uninstall.meta.diagcab from this https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed page

就我而言,每次日志中的“名称”不同时,“vs”安装程序都会显示相同的错误。 我只是将它们一一删除,问题就解决了。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法再卸载 Visual Studio 2017 的相关文章

随机推荐

  • JVM 在 OutOfMemoryError 之后是否自行终止 [重复]

    这个问题在这里已经有答案了 发生 OutOfMemoryError 后 JVM 会自行终止吗 如果不是那么为什么 它会尝试收回资源吗 还是有其他原因 OutOfMemoryError 不会终止 JVM 如果它未被捕获 它将终止引发错误的线程
  • angularjs 获取表单操作并提交给它

    我有一个表单 我想捕获它的提交 检查数据的验证 然后将表单提交到 HTML 表单内的操作 div div
  • Jquery 验证自定义错误消息位置

    这看起来很简单 但我无法弄清楚 我正在使用 jquery 验证插件 我正在尝试验证
  • 从点列表中获取两个最近的点

    我得到了一个整数 浮点数列表 我需要找到最接近的两个数字 我将如何仅使用嵌套 for 循环来做到这一点 如果点是一维的 就像您的输入只是一个数字列表 例如 1 4 6 2 那么你可以通过对它们进行排序并找到差异最小的在 O n log n
  • Reactjs - redux 表单和材质 UI 框架 - 具有自动类型 - 和清除字段功能

    我正在构建一个使用 redux 表单和材料 ui 框架的嵌套表单框架 迄今为止我已经在这里构建了组件 https codesandbox io s heuristic hopper lzekw https codesandbox io s
  • 在 GWT 中使数据网格的行可拖动

    我想制作一个数据网格 其中的行可以拖动 以便人们可以通过拖动行来上下移动行 由于数据网格的行将作为元素获取 我知道如何使小部件可拖动 但是如何使数据网格的行可拖动 我不想使用任何额外的插件或库来实现此目的 我所知道的唯一支持单元格小部件拖放
  • 如何配置 Hibernate 以立即应用所有保存、更新和删除?

    我该如何配置休眠 http www hibernate org 在会话执行每个操作后立即将所有保存 更新和删除应用到数据库服务器 默认情况下 Hibernate 将所有保存 更新和删除操作排入队列 并仅在经过一段时间后才将它们提交到数据库服
  • Scala:列表 [Tuple3] 到映射 [字符串,字符串]

    我得到的查询结果为List Int String Double 我需要将其转换为Map String String 用于在 html 选择列表中显示 我的破解方案是 val prices dao getPricing flatMap cas
  • 使用 Redux Observable 等待操作序列

    我有一个用例 在使用 Redux Observables 调度另一个操作之前 我需要等待一系列操作 我见过一些类似的问题 但我无法理解如何在给定的用例中使用这些方法 本质上我想做这样的事情 action ofType PAGINATION
  • 自定义内存管理器

    我正在尝试实现一个自定义内存管理器 我想知道是否有更好的方法来实现这个函数 因为当我被问及 void 指针算术时 有几个人认为如果我在 C 中有一个 void 那就太糟糕了错误的 allocates a page of memory voi
  • 为什么我的调试数据未格式化?

    var dump and print r使用 Laravel 4 时显示的数据未格式化 如何格式化数据以使其更具可读性 通过在命令行上运行以下命令将 Kint 添加到您的composer json composer require rave
  • Metamask 停止注入 web3.js

    据我们所知 从2020年1月13日开始 metamask将不再注入web3 js 我们应该采取哪些方法来停止对web3的依赖 另外 我们如何使用目前正在注入 web3 js 的现有 Metamask 来测试它 window ethereum
  • 为什么使用类方法而不是静态方法? [复制]

    这个问题在这里已经有答案了 我知道他们是做什么的 并且我见过很多这两个例子 但我还没有找到一个我必须使用的例子classmethod而不是用staticmethod 最常见的例子是classmethod我见过的是用于创建新实例类本身 就像这
  • 积分运算符 quot 与 div

    类型类 Integral 有两个操作quot and div 但在 Haskell 2010 语言报告中并没有具体说明它们应该做什么 假如说div是积分除法 什么quot不同 或者目的是什么quot 什么时候使用其中一个 什么时候使用另一个
  • 生成生成集的算法

    给定此输入 1 2 3 4 我想生成一组跨越集 1 2 3 4 1 2 3 4 1 2 3 4 1 3 2 4 1 2 3 4 1 3 2 4 1 4 2 3 1 2 3 4 1 3 2 4 1 4 2 3 1 2 3 4 1 2 4 3
  • 如何在 django 2.0 管理中使用allow_tags?

    Support for the allow tags attribute on ModelAdmin methods is removed 刚刚找到答案 使用mark safe https docs djangoproject com en
  • 非连续元素的最大和

    给定一个正整数数组 从该数组中查找非连续元素的最有效算法是什么 这些元素加在一起时会产生最大总和 动态规划 给定一个数组A 0 n let M i 是使用带有索引的元素的最佳解决方案0 i Then M 1 0 用于递归 M 0 A 0 a
  • 更改使用模式匹配的 do 表达式来应用绑定运算符

    原问题 利亚 在对于更多的 Monad http learnyouahaskell com for a few monads more显示此功能 solveRPN String gt Maybe Double solveRPN st do
  • Sequelize.js 删除查询?

    有没有办法像findAll一样编写delete deleteAll查询 例如 我想做这样的事情 假设 MyModel 是 Sequelize 模型 MyModel deleteAll where some field something o
  • 无法再卸载 Visual Studio 2017

    我在运行最新的 VS2017 时遇到了严重的问题 因为在我升级它时它进入了不一致的状态 有一些残留的软件包拒绝卸载 因为它们显然缺少来自的缓存文件C Windows Installer文件夹 我从来没有碰过那个文件夹 然而 我确实移动了C