Visual Studio 安装程序在 AspNetDiagnosticPack.msi 上失败 [英] Visual Studio installer fails on AspNetDiagnosticPack.msi

查看:29
本文介绍了Visual Studio 安装程序在 AspNetDiagnosticPack.msi 上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在此处描述了问题.任何安装 AspNetDiagnosticPack.msi 的尝试C:ProgramDataMicrosoftVisualStudioPackagesMicrosoft.VisualStudio.AspNetDiagnosticPack.Msi,version=15.0.40314.0AspNetDiagnosticPack.msi 失败,错误状态:1603.我现在无法使用 VS 安装程序添加或删除任何组件.

I have the problem described here. Any attempt to install AspNetDiagnosticPack.msi C:ProgramDataMicrosoftVisualStudioPackagesMicrosoft.VisualStudio.AspNetDiagnosticPack.Msi,version=15.0.40314.0AspNetDiagnosticPack.msi fails with error status: 1603. I cannot add or remove any component using VS installer now.

我已经安装了 VS 2017 Professional 如下:

I have installed VS 2017 Professional as follows:

Microsoft Visual Studio Professional 2017 
Version 15.6.6
VisualStudio.15.Release/15.6.6+27428.2037
Microsoft .NET Framework
Version 4.7.02558

Installed Version: Professional

Visual C++ 2017   00370-20001-54960-AA753
Microsoft Visual C++ 2017

Visual F# Tools 10.1 for F# 4.1   00370-20001-54960-AA753
Microsoft Visual F# Tools 10.1 for F# 4.1

Application Insights Tools for Visual Studio Package   8.11.10402.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.40314.0
ASP.NET and Web Tools 2017

Azure App Service Tools v3.0.0   15.0.40215.0
Azure App Service Tools v3.0.0

C# Tools   2.7.0-beta3-62715-05. Commit Hash: db02128e6e3c4bdfc93e6ec425ac9162b4d4fe80
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter   15.6.18072.2
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Dotfuscator Community Edition   5.32.1.6167-6ce295ebd
PreEmptive Protection - Dotfuscator CE

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.51212.2

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Node.js Tools   1.4.11027.3
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Python   15.6.18072.2
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Python - Django support   15.6.18072.2
Provides templates and integration for the Django web framework.

Python - IronPython support   15.6.18072.2
Provides templates and integration for IronPython-based projects.

Python - Profiling support   15.6.18072.2
Profiling support for Python projects.

SQL Server Data Tools   15.1.61801.210
Microsoft SQL Server Data Tools

TypeScript Tools   15.6.20202.3
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   2.7.0-beta3-62715-05. Commit Hash: db02128e6e3c4bdfc93e6ec425ac9162b4d4fe80
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

我认为问题源于以前 VS 版本的一些遗留问题.我无法卸载 ASP.NET and Web Tools 2013.1.我终于通过重新安装 VS 2015 并使用 此答案中的 FixIt 工具将其删除..但是 AspNetDiagnosticPack.msi 仍然以同样的方式失败.

I thought that the problem originated in having some remains from previous VS editions. I could not uninstall namely ASP.NET and Web Tools 2013.1. I have finally removed it after all by reinstalling VS 2015 and using the FixIt tool from this answer.. But still AspNetDiagnosticPack.msi fails the same way.

我也尝试过完全卸载web开发角色,因为我可能不会很快使用它,但是安装总是失败.是否有任何解决方法可以让 VS 安装程序再次运行?

I also tried to uninstall the web development role completely, since I will probably not use it soon, but installation allways fails. Is there any workaround to make the VS installer work again?

msi 日志在这里.

Action 15:50:02: WebConfigInitialize.
Action start 15:50:02: WebConfigInitialize.
MSI (s) (B8:F4) [15:50:02:244]: Invoking remote custom action. DLL: C:WindowsInstallerMSIFF27.tmp, Entrypoint: Initialize
MSI (s) (B8:40) [15:50:02:244]: Generating random cookie.
MSI (s) (B8:40) [15:50:02:244]: Created Custom Action Server with PID 10588 (0x295C).
MSI (s) (B8:14) [15:50:02:306]: Running as a service.
MSI (s) (B8:14) [15:50:02:306]: Hello, I'm your 32bit Impersonated custom action server.
SFXCA: Failed to create new CA process via RUNDLL32. Error code: 2
CustomAction WebConfigInitialize returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 15:50:02: WebConfigInitialize. Return value 3.

但问题出在自定义操作 WebConfigInitialize 中,日志没有太大帮助.我观察到当我运行卸载程序工具时有一个条目 Microsoft ASP.NET and Web Tools 2015.1 - Visual Studio 2015 - 并且该条目卸载失败.也许我的问题的根源是我曾经用 Visual Studio 2015 安装了 ASP.NET 的一些测试版.我现在不需要 ASP.NET,但我 VS 2017 安装程序卡在错误上.

But the problem is within custom action WebConfigInitialize and the log is no big help. I have observed that there was an entry Microsoft ASP.NET and Web Tools 2015.1 - Visual Studio 2015 when I ran the uninstaller tool - and this entry failed uninstalling. Perhaps the origin of my problems is that I once installed some beta verison of ASP.NET with Visual Studio 2015. I do not need ASP.NET for now, but I the VS 2017 installer is stuck on the error.

我在我的计算机上的缓存包中发现了 WebToolsExtensionsVS14_rc2_48.msi,卸载此包的方式与 2017 年当前包的 1603 相同.

I have found WebToolsExtensionsVS14_rc2_48.msi in cached packages on my computer and uninstalling this package fails the same way with 1603 as the 2017 current package.

Action 8:30:41: WebConfigInitialize. 
Action start 8:30:42: WebConfigInitialize.
MSI (s) (48:BC) [08:30:42:012]: Creating MSIHANDLE (550) of type 790542 for thread 1980
MSI (s) (48:F0) [08:30:42:012]: Invoking remote custom action. DLL: C:WindowsInstallerMSIA2E1.tmp, Entrypoint: Initialize
MSI (s) (48!A0) [08:30:42:028]: Creating MSIHANDLE (551) of type 790531 for thread 928
SFXCA: Failed to create new CA process via RUNDLL32. Error code: 2
MSI (s) (48!A0) [08:30:42:028]: Closing MSIHANDLE (551) of type 790531 for thread 928
CustomAction WebConfigInitialize returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (48:F0) [08:30:42:028]: Closing MSIHANDLE (550) of type 790542 for thread 1980
Action ended 8:30:42: WebConfigInitialize. Return value 3.

类似问题这里,那个以重新安装他的机器结束.

Similar problem here, that one ended with reninstalling his machine.

或者是否有一些工具可以显示特定 MSI 包的依赖关系?

Or is there some tool that would show the dependencies of a particular MSI package?

此处提供了与问题相关的当前开发者社区链接.

它说:

我们已在即将发布的版本中修复了该问题.我们已经解决了ASP.NET 诊断包中的托管自定义操作,用于修改根 web.config 文件以使用本机代码操作.这应该避免之前在尝试启动托管时报告的 CLR 错误安装过程中的代码 DLL.

We have fixed the problem in an upcoming release. We've addressed the managed custom action in the ASP.NET Diagnostic Pack that modifies the root web.config file to use a native code action. This should avoid the CLR errors previously reported when it tried to launch the managed code DLL during the install.

我们最新的 Visual Studio Preview 版本现已修复此问题.如果您想尝试修复,可以访问预览版本在这里:https://www.visualstudio.com/vs/preview

The fix for this is now in our latest Visual Studio Preview release. If you'd like to try out the fix, you can access the preview build here: https://www.visualstudio.com/vs/preview

除了等待 Microsoft 修复该失败的自定义操作之外,似乎没有其他解决方法.我一开始忽略了这个建议,因为我没有正确检查评论的日期,但它们只有一个月大.但是,当我尝试安装预览版时,它以完全相同的错误结束 .

Looks like there is no workaround except waiting for Microsoft's fix to that faliling custom action. I have ignored this recommendation at first because I did not check the date of comments properly but they are only one month old. But when I have tried to install the preview it ended with exactly the same error.

在 15.7.1 版本中再次出现同样的错误.

In 15.7.1 version the same error again.

推荐答案

UPDATE:看起来问题可能出在 托管代码自定义操作在相关 MSI 中失败(无法运行的 .NET 代码 - 无论出于何种原因 1, 2, 3).

UPDATE: It looks like the issue might be a managed code custom action failing in the MSI in question (.NET code that can't run - for whatever reason 1, 2, 3).

我会首先尝试1) 重新启动 我在下面建议 - 清除空气并释放任何锁定 - 然后 2) 禁用安全软件/防病毒3) 尝试安装并启用日志记录,如下所述.

I would first try to 1) do the reboot I recommend below - to clear the air and release any locks - then 2) disable security software / anti-virus and 3) try the install and enable logging as described below.

随着部署的进行,问题往往集中在:1) 某些东西被锁定(正在使用 - 被其他进程或其他用户登录on), 2) 某些东西被阻止(访问/权限被拒绝),3) 缺少自定义操作或整个安装程序的依赖项(不满足运行时要求 - 例如缺少 .NET 运行时版本),4)> 某些东西损坏(数据文件、操作系统设置、恶意软件通常是罪魁祸首 - 或不明智的修补),5) 存在意外的系统状态,例如磁盘已满,或者更奇特的是日期和时间错误,或者许可问题或其他一些奇怪的问题,等等...

As deployment goes, problems tend to center around: 1) something is locked (in use - by other processes or other users logged on), 2) something is blocked (access / permissions denied), 3) dependencies are missing for your custom actions or the whole installer (runtime requirements not satisfied - for example missing .NET runtime version), 4) something is corrupted (data file, OS settings, malware is often the culprit here - or unwise tinkering), 5) there is an unexpected system state such as the disk being full, or more exotic the date and time is wrong, or there is a licensing issue or some other oddity, etc...

这是一个非常简单的原因列表 - 显然还有许多其他问题,例如 6) 本地化错误:硬编码路径、日期时间解析错误、路径名字符无效等... 7) 文件名和路径名太长, 8) 和 Microsoft 的专长:产品之间奇怪和意外的不兼容性 没有被认为有相互冲突的正当理由(不同版本的 VisualStudio 等...)等...,但这对您的问题来说太过分了.不过,这里是 一段时间以前的通用部署问题"摘要 - 仅供参考.

That is a very simplified list of causes - there are obviously many further issues, for example 6) localization errors: hard coded paths, erroneous parsing of dates and time, invalid characters in path names, etc... 7) file and path names are too long, 8) and the Microsoft specialty: weird and unexpected incompatibilities between products not thought to have a valid reason to conflict with each other (different versions of Visual Studio, etc...), etc..., but that is going way too far for your problem. Still, here is a generic "deployment problems" summary from some time back - just for reference.

  1. 重新启动:我要做的第一件事是重新启动,然后尝试以常规方式调用安装.这只是为了排除这种简单的解决方案"(有时有效).可能存在安装程序必须替换的正在使用的文件才能完成.

  1. Reboot: The first thing I would do is to reboot and then try to invoke the install the regular way. This is just to rule out this "simple solution" (which sometimes works). There could be files in use that the installer must replace in order to complete.

日志:为了最大限度地利用可用的调试信息,您可以使用详细的日志记录和调试信息来记录安装(如果您有权访问 MSI 本身).

Logging: In order to maximize the available debugging information you could log the install with verbose logging and debugging information (if you have access to the MSI itself).

  • 打开提升的命令提示符(右键单击并以管理员身份运行)
  • 更改当前目录 (cd) 直至到达:C:ProgramDataMicrosoftVisualStudioPackagesMicrosoft.VisualStudio.AspNetDiagnosticPack.Msi,version=15.0.40314.0
  • MSI Log:运行此命令(根据需要调整路径 - 特别是对于日志文件):msiexec.exe/i AspNetDiagnosticPack.msi/L*vx C:Test.log
    • Open an elevated command prompt (right click and run as administrator)
    • Change current directory (cd) until you get to: C:ProgramDataMicrosoftVisualStudioPackagesMicrosoft.VisualStudio.AspNetDiagnosticPack.Msi,version=15.0.40314.0
    • MSI Log: Run this command (adjusting paths as appropriate - especially for the log file): msiexec.exe /i AspNetDiagnosticPack.msi /L*vx C:Test.log
      • Enable All: You can enable logging for all MSI files (slows installs, but great for advanced users): http://www.installsite.org/pages/en/msifaq/a/1022.htm (section: "Globally for all setups on a machine")
      • Interpret: How to interpret an MSI log file: http://www.installsite.org/pages/en/msifaq/a/1045.htm

      不同的用户:这是不寻常的建议(我还没有尝试过),但有时您可以通过创建新的本地admin 用户,然后从那里运行安装程序.它与用户配置文件中的错误有关.不是第一次尝试,而是将其添加为一个选项.

      Different User: This is unusual advice (and I haven't tried it), but sometimes you can succeed with difficult installs by creating a new local admin user on the machine, and then running the installer from there. It has to do with errors in the user profile. Not the first thing to try, but adding it as an option.

      这篇关于Visual Studio 安装程序在 AspNetDiagnosticPack.msi 上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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