Visual Studio 2019(本身):目标调用的异常已被抛出

5
昨晚我安装了Visual Studio 2019企业版,安装了大部分常用扩展并试用了一下,没有出现问题。 关闭后,今天早上重新启动它时,在VS启动画面后立即出现以下错误信息:Screenshot 之后,VS就会自动关闭。 我尝试使用/safemode在安全模式下运行VS,但仍然出现相同的问题。在运行ProcDump命令(Procdump64.exe -w devenv.exe -e 1 -n 1000 -f *TargetInvocationException* -ma > out.txt)后,未创建任何 .dmp 文件,但out.txt文件显示如下:
Waiting for process named devenv.exe...

Process:               devenv.exe (10576)
Process image:         C:\Coding\IDE\VS2019\Common7\IDE\devenv.exe
CPU threshold:         n/a
Performance counter:   n/a
Commit threshold:      n/a
Threshold seconds:     n/a
Hung window check:     Disabled
Log debug strings:     Disabled
Exception monitor:     First Chance+Unhandled
Exception filter:      [Includes]
                       *TargetInvocationException*
                       [Excludes]
Terminate monitor:     Disabled
Cloning type:          Disabled
Concurrent limit:      n/a
Avoid outage:          n/a
Number of dumps:       1000
Dump folder:           C:\Downloads\
Dump filename/mask:    PROCESSNAME_YYMMDD_HHMMSS
Queue to WER:          Disabled
Kill after dump:       Disabled


Press Ctrl-C to end monitoring without terminating the process.

[16:33:52] Exception: 04242420
[16:33:53] Exception: E0434352.CLR
[16:33:53] Exception: E0434352.CLR
[16:33:53] Exception: E0434352.CLR
[16:33:53] Exception: E0434352.CLR
[16:33:56] Exception: E0434352.CLR
[16:33:56] Exception: E0434352.CLR
[16:33:56] Exception: E0434352.CLR
[16:33:56] Exception: E0434352.CLR
[16:33:56] Exception: E06D7363.msc
[16:33:56] Exception: E0434352.CLR
[16:33:56] Exception: E0434352.CLR
[16:33:56] Exception: E0434352.CLR
[16:33:56] Exception: E0434352.CLR
[16:33:57] The process has exited.
[16:33:57] Dump count not reached.

我也尝试了运行sfc /scannowdevenv/updateconfiguration,检查是否有新的Windows更新并以管理员身份运行VS,但仍然卡在这个位置。在我解决这个问题之前,Visual Studio 2019对我来说是无用的。有人知道解决办法吗?

4个回答

2

好的,虽然我仍然不知道到底出了什么问题,但等待一段时间后,我决定尝试在之前的安装上重新安装,希望它能自己修复;运行安装程序时显示VS 2019有更新以及VS 2017有更新,所以我更新了两个版本,当所有操作完成后,VS 2019能够重新启动。

“最初的回答”翻译成英文是"Original Answer"。


2

在我限制了Windows UAC设置后,出现了这个问题,通过以管理员身份运行VS来解决。


1

请尝试以下步骤:

  1. 打开Windows资源管理器,导航至<Visual Studio Installation Path>\Common7\IDE(默认路径为C:\Program Files或Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE);
  2. 删除ItemTemplatesCacheProjectTemplatesCache文件夹;
  3. 开始菜单 -> 所有程序 -> Microsoft Visual Studio -> Visual Studio Tools下以管理员权限运行Visual Studio命令提示符;
  4. 运行devenv /InstallVSTemplates命令;
  5. 运行devenv /Setup命令。

0

只需修复您的Visual Studio 2017即可

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接