我正在尝试安装VS '17,以开始编程,并且教程告诉我要安装一个软件包。问题是这个软件包包含JustInTime。当出现Microsoft.VisualStudio.Debugger.JustInTime时,安装就停止了。
那么现在我该怎么办?
那么现在我该怎么办?
解决方案1
1. 点击取消,几分钟后会要求更新VS安装程序。
2. 更新Visual Studio Installer。
3. 重新启动计算机。安装程序将自动继续。
解决方案2
1. 下载Process Explorer
2. 终止vs_installershell.exe下的PowerShell.exe进程
3. 安装程序将跳过JustInTime并恢复
4. VS安装完成后,您需要手动安装JustInTime
解决方案3
1. 将系统变量__PSLockDownPolicy的值更新为1
2. 重新启动计算机
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错误。使用错误80070002加载托管的Windows PowerShell失败
您可以通过打开文件浏览器到“C:\Windows\SysWOW64\WindowsPowerShell\v1.0”并重命名powershell.exe.config来解决此问题。从DOS提示符重新运行您的PowerShell命令现在应该可以无错误地执行。