简体   繁体   English

安装后启动 Visual Studio 2017 社区时出现“未知错误”

[英]“Unknown Error” when launching Visual Studio 2017 Community after installation

I am getting an "Unknown Error" (shown below) alert when I try to launch Visual Studio 2017 Community after successful installation.在成功安装后尝试启动 Visual Studio 2017 社区时,我收到“未知错误”(如下所示)警报。

在此处输入图片说明

UPDATE: After Force uninstall & reinstallation更新:强制卸载和重新安装后

在此处输入图片说明

remove this folder (or similar):删除此文件夹(或类似文件夹):

%LocalAppData%\\Microsoft\\VisualStudio\\15.0_db2a872f %LocalAppData%\\Microsoft\\VisualStudio\\15.0_db2a872f

  • folder name 15.0_db2a872f could be different in your machine eg.文件夹名称15.0_db2a872f在您的机器中可能不同,例如。 15.0_XXXXXXX
  • found in the vs startup log that processing of Progression_NativePackage_Component_x86.pkgdef bailed out, indicating an inconsistent extension installation在vs启动日志中发现Progression_NativePackage_Component_x86.pkgdef处理跳空了,说明扩展安装不一致

I only had to rename(if you wan't to back it up)/delete the following file:需要重命名(如果你不想备份它)/删除以下文件:

privateregistry.bin私有注册表.bin

or或者

privateregistry.user.bin privateregistry.user.bin

depending on Visual Studio version.取决于 Visual Studio 版本。

%LocalAppData%\\Microsoft\\VisualStudio\\15.0_********\\privateregistry.bin %LocalAppData%\\Microsoft\\VisualStudio\\15.0_********\\privateregistry.bin

%LocalAppData%\\Microsoft\\VisualStudio\\15.0_********\\privateregistry.user.bin %LocalAppData%\\Microsoft\\VisualStudio\\15.0_********\\privateregistry.user.bin

After restarting Visual Studio 2017 you may need to activate Tools or Extensions again.重新启动 Visual Studio 2017 后,您可能需要再次激活Tools or Extensions

Please check if the machine has Symantec Workspace Virtualization Agent installed.请检查机器是否安装了 Symantec Workspace Virtualization Agent。 Removing the product from add\\remove programs fixed the unknown error while launching VS 2017.从添加\\删除程序中删除产品修复了启动 VS 2017 时的未知错误。

Here is the detail of the product.这是产品的详细信息。 Product code: {785F9A4D-D113-43B3-AA1D-77AD777F0A2F} Package code: {32DB9767-3EF7-465A-ADF2-7ECFD25ABC12} Install date: 2015.05.21 Version: 6.4.1266 Publisher: Symantec产品代码:{785F9A4D-D113-43B3-AA1D-77AD777F0A2F} 包装代码:{32DB9767-3EF7-465A-ADF2-7ECFD25ABC12} 安装日期:2015.05.21 版本:6.4.126 Symantec Publisher

I ran it as Admin and it somehow booted up just fine after that.我以管理员身份运行它,之后它以某种方式启动得很好。 I was getting the same error even after making sure that all packages and SDKs were installed until I ran it as admin.即使在我以管理员身份运行之前确保安装了所有软件包和 SDK 之后,我也遇到了同样的错误。

Basically, just go to the shortcut in Start or to the .exe in the files, then right click it and run as Admin or change it in the properties.基本上,只需转到“开始”中的快捷方式或文件中的 .exe,然后右键单击它并以管理员身份运行或在属性中更改它。 Tbh, it seems like a temporary fix and I'd actually like to know the real source of the problem, but for now, I don't have to reinstall and repair over and over. Tbh,这似乎是一个临时修复,我实际上想知道问题的真正根源,但现在,我不必一遍又一遍地重新安装和修复。

Same version: Visual Studio Community 2017 installed using the launcher相同版本:使用启动器安装的 Visual Studio Community 2017

I have a same problem after update VS 2017 Enterprise to the build 26228.9.将 VS 2017 Enterprise 更新到 build 26228.9 后,我遇到了同样的问题。

Repair installation doesn't fix anything.修复安装不修复任何东西。 Still I got "Unknown error" message immediately after start VS2017.在启动 VS2017 后,我仍然立即收到“未知错误”消息。

Fixing is possible by removing this folder:通过删除此文件夹可以修复:

"C:\Users\USER_NAME\AppData\Local\Microsoft\VisualStudio\15.0_xxxxxxx"

where xxxxxxxx is some hexadecimal number.其中 xxxxxxxx 是一些十六进制数。

BUT AFTER THAT YOU LOSE ALL SETTINGS that you done on your installation of VS 2017 (except product license key appliance).但在那之后,您丢失了在安装 VS 2017 时所做的所有设置(产品许可证密钥设备除外)。

Sorry that I must say this, but:抱歉,我必须这样说,但是:

Maybe will be better stuck on the VS2015 for now.也许现在会更好地停留在 VS2015 上。 Because MS still not has really fully functional build of VS for now.因为 MS 目前还没有真正功能齐全的 VS 版本。

VS 2017 is still ready for first experimenting only and not for real work. VS 2017 仍准备用于第一次试验,而不是用于实际工作。

It is same story like a was when VS2015 has been published.这与 VS2015 发布时的情况相同。 (after several days stop working). (几天后停止工作)。

I fixed it the same way as niclar by deleting folder 15_.*.我通过删除文件夹 15_.* 以与 niclar 相同的方式修复它。 It does however appear that renaming privateregistry.bin has same effect with less trouble.然而,重命名privateregistry.bin似乎具有相同的效果,但麻烦更少。

As mentioned by Torbjorn, ReSharper and other Extensions can mess up, however no reinstall required.正如 Torbjorn 所提到的,ReSharper 和其他扩展可能会搞砸,但不需要重新安装。

Merely go to Tools > Extensions and Updates... > Scroll through list of Installed Extensions > Enable those that should be enabled.只需转到工具 > 扩展和更新... >滚动浏览已安装的扩展列表> 启用应启用的扩展

I have a side by side installation with VS2015.我与 VS2015 并排安装。 After opening and closing VS2015 once, VS2017 ist starting again normally.打开和关闭VS2015一次后,VS2017再次正常启动。 Strange but helped in my case.奇怪,但对我有帮助。

我只需要在 C:\\users{your username}\\AppData\\Local\\Microsoft\\VisualStudio\\15.0_c31ecfb9 文件夹中删除或重命名ApplicationPrivateSettings.lock

I was experiencing this issue with Visual Studio Professional when not running as administrator.未以管理员身份运行时,我在使用 Visual Studio Professional 时遇到了此问题。 (It worked Ok as administrator) I used Niclar's solution of deleting the folders. (以管理员身份工作正常)我使用了 Niclar 的删除文件夹的解决方案。

安装扩展程序并删除文件夹“ C:\\Users\\USER_NAME\\AppData\\Local\\Microsoft\\VisualStudio\\15.0_xxxxxxx ”后,我发现了同样的问题,解决了我的问题。

您可以重命名解决方案名称并在修复 VS 安装后重新打开它为我解决的项目

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

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