繁体   English   中英

及时调试器不会安装在Visual Studio 2017中

[英]Just in time debugger won't install in Visual Studio 2017

我正在尝试安装VS '17,开始编程,一个教程告诉我安装一个软件包。 问题是这个包包含JustInTime。 当Microsoft.VisualStudio.Debugger.JustInTime出现时,安装会暂停。

那我现在该怎么办?

Visual Studio安装停止

解决方案1
1.单击“取消”,几分钟后,它将要求更新VS安装程序。
2.更新Visual Studio安装程序。
3.重新启动电脑。 安装程序将自动继续。

解决方案2
1.下载Process Explorer
2.在vs_installershell.exe下杀死PowerShell.exe进程
3.安装程序将继续跳过JustInTime
4. VS安装完成后,您必须手动安装JustInTime

解决方案3
1.将System Variable __PSLockDownPolicy值更新为1
2.重启PC
3.重新启动安装

在此输入图像描述

PS:解决方案3为我工作
REF: 有用的链接

停止(冻结)? 还是失败? 在我的情况下(失败),结果证明PowerShell本身存在问题。 添加JIT调试器时工作室安装程序生成的日志如下所示:

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

Incomplete components  Just-In-Time debugger (Microsoft.VisualStudio.Component.Debugger.JustInTime,version=15.0.26208.0)
You can search for solutions using the information below...<snipLengthyExplanatoryText>...be able to find solutions or workarounds.

Package 'Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26424.2' failed to install.

Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.Debugger.JustInTime;PackageAction=Install;ReturnCode=-65536

Impacted components
    Just-In-Time debugger (Microsoft.VisualStudio.Component.Debugger.JustInTime,version=15.0.26208.0)

Log
    C:\Users\<yourUser>\AppData\Local\Temp\dd_setup_<datetime>_273_Microsoft.VisualStudio.Debugger.JustInTime.log

Details
    Command executed: "c:\windows\syswow64\\windowspowershell\v1.0\powershell.exe"
    -ExecutionPolicy Bypass -InputFormat None -NoLogo -NonInteractive -NoProfile -Command "$ErrorActionPreference="""Stop""";$VerbosePreference="""Continue""";$Action="""Repair""";$AppId="""2763a993""";$Packages="""Microsoft.VisualStudio.Component.CoreEditor
    ...<snipLongListOfPackageNames>...""";[io.file]::ReadAllText("""C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26424.2\RegisterJustInTimeDebugger.ps1""") | Invoke-Expression; if (!$?) { exit 1603 } elseif ($LastExitCode) { exit $LastExitCode }"
        Return code: -65536
        Return code details: Unknown error (0xffff0000)

如果启动dos提示符(作为管理员),请运行“已执行命令”下列出的命令,您会看到以下错误:

内部Windows PowerShell错误。 加载受管Windows PowerShell失败,错误为80070002

您可以通过将文件资源管理器打开到“C:\\ Windows \\ SysWOW64 \\ WindowsPowerShell \\ v1.0”并重命名powershell.exe.config来解决此问题。 现在应该从dos提示符重新运行powershell命令,而不会出现错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM