61

I am getting an "Unknown Error" (shown below) alert when I try to launch Visual Studio 2017 Community after successful installation.

enter image description here

UPDATE: After Force uninstall & reinstallation

enter image description here

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Ajay Jadhav
  • 2,417
  • 4
  • 21
  • 26
  • Repaired? Force uninstalled and reinstalled? What does the eventlog say? Tried starting with /SafeMode? Tried starting with logging enabled? – jessehouwing Mar 10 '17 at 11:49
  • Computer rebooted? – zett42 Mar 10 '17 at 11:54
  • Repaired? - Yes, Force uninstalled and reinstalled? - No, What does the eventlog say? - Not finding anything related to VS installation Tried starting with /SafeMode? - Trying now. Tried starting with logging enabled? - how do I do that? – Ajay Jadhav Mar 10 '17 at 11:59
  • @zett42 Yes, computer was rebooted? – Ajay Jadhav Mar 10 '17 at 12:00
  • Got the same error when I tried to launch the second instance of Visual Studio – Ilya Ivanov Mar 10 '17 at 12:03
  • @jessehouwing I "Force uninstalled and reinstalled", but still same error when I click "launch". – Ajay Jadhav Mar 10 '17 at 12:25
  • Does the error happen when launching via desktop or start menu shortcut? Does it happen when launching executable directly from install directory? – zett42 Mar 10 '17 at 12:45
  • Enable log: `devenv.exe /log Path\NameOfLogFile`, safe mode: `devenv.exe /SafeMode` Taken from [Devenv Command Line Switches](https://msdn.microsoft.com/en-us/library/xee0c8y7.aspx) (I assume they are the same for VS2017). – zett42 Mar 10 '17 at 12:51
  • any updates on this? – Abdel Raoof Olakara Mar 13 '17 at 04:45
  • I was getting this error after installing Votive2017.vsix (the [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension)). To my surprise, after launching Visual Studio 2017 (Enterprise) several times the error disappeared. It seems that Visual Studio repaired the error condition by itself. What I would be interested in is how one can disable extensions to allow VS starting up without error - is there a command line switch available? – Matt Apr 03 '17 at 08:50

11 Answers11

92

remove this folder (or similar):

%LocalAppData%\Microsoft\VisualStudio\15.0_db2a872f

  • folder name 15.0_db2a872f could be different in your machine eg. 15.0_XXXXXXX
  • found in the vs startup log that processing of Progression_NativePackage_Component_x86.pkgdef bailed out, indicating an inconsistent extension installation
Sreekumar P
  • 5,900
  • 11
  • 57
  • 82
niclar
  • 1,052
  • 7
  • 2
  • 6
    That did help. I had different folders with the pattern `15.0_*` laying around. However, one should note that this will reset (some of) your personal settings. In addition, I had to reinstall ReSharper++. – Torbjörn Mar 14 '17 at 19:08
  • @niclar This worked for me too and the VS started. Thanks a lot. However, it created that folder again. – Ajay Jadhav Mar 15 '17 at 10:58
  • Darn... found this too late, now I cannot stop the uninstall and I have a slow internet connection... The reboot didn't do anything. It happened after I tried to install an extension... – Lord of Scripts Apr 11 '17 at 19:59
  • 3
    Just deleting the vspdmc.lock file in that folder worked for me – Amit G Apr 19 '17 at 10:15
  • I had this problem again after applying the 15.1 update but this tip saved me a lot of time, it works! – Lord of Scripts Apr 19 '17 at 15:44
  • 3
    just found out that doing this will wipe out all your user settings.... – codersl Apr 30 '17 at 23:39
  • Please, use %LocalAppData%\Microsoft\VisualStudio\... instead – Dmitry Gusarov Jun 01 '17 at 08:49
54

I only had to rename(if you wan't to back it up)/delete the following file:

privateregistry.bin

or

privateregistry.user.bin

depending on Visual Studio version.

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

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

After restarting Visual Studio 2017 you may need to activate Tools or Extensions again.

Community
  • 1
  • 1
Bruno Bieri
  • 9,724
  • 11
  • 63
  • 92
2

Please check if the machine has Symantec Workspace Virtualization Agent installed. Removing the product from add\remove programs fixed the unknown error while launching 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

rathish rk
  • 414
  • 4
  • 8
0

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.

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. 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.

Same version: Visual Studio Community 2017 installed using the launcher

Sorral
  • 17
  • 4
  • Did you also apply any updates while you had it open as admin? – Lorraine Mar 16 '17 at 10:13
  • Sorry for the late reply. No, I just installed it like normal after selecting what I want. I went for a minimal install later and had the same issue until I ran it as admin. Deleting the folder in AppData as DimaSan mentioned worked for me, but it did reset the settings I had in. – Sorral Mar 27 '17 at 06:07
  • I tried this. Started up as admin. Shut down admin version, started version for me as standard user. Didn't help. Tried Bruno's answer (delete privateregistry.bin).... that worked. – Ira Baxter Jul 14 '17 at 17:59
0

I have a same problem after update VS 2017 Enterprise to the build 26228.9.

Repair installation doesn't fix anything. Still I got "Unknown error" message immediately after start 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.

BUT AFTER THAT YOU LOSE ALL SETTINGS that you done on your installation of VS 2017 (except product license key appliance).

Sorry that I must say this, but:

Maybe will be better stuck on the VS2015 for now. Because MS still not has really fully functional build of VS for now.

VS 2017 is still ready for first experimenting only and not for real work.

It is same story like a was when VS2015 has been published. (after several days stop working).

Neil
  • 14,063
  • 3
  • 30
  • 51
Poke
  • 11
0

I fixed it the same way as niclar by deleting folder 15_.*. It does however appear that renaming privateregistry.bin has same effect with less trouble.

As mentioned by Torbjorn, ReSharper and other Extensions can mess up, however no reinstall required.

Merely go to Tools > Extensions and Updates... > Scroll through list of Installed Extensions > Enable those that should be enabled.

Emil L.
  • 97
  • 10
0

I have a side by side installation with VS2015. After opening and closing VS2015 once, VS2017 ist starting again normally. Strange but helped in my case.

martinoss
  • 5,268
  • 2
  • 45
  • 53
0

I only needed to delete or rename ApplicationPrivateSettings.lock within C:\users{your username}\AppData\Local\Microsoft\VisualStudio\15.0_c31ecfb9 folder.

Nick Painter
  • 720
  • 10
  • 13
0

I was experiencing this issue with Visual Studio Professional when not running as administrator. (It worked Ok as administrator) I used Niclar's solution of deleting the folders.

Kirsten
  • 15,730
  • 41
  • 179
  • 318
0

I found same issue after installing the extension and removing the folder "C:\Users\USER_NAME\AppData\Local\Microsoft\VisualStudio\15.0_xxxxxxx" solved my problem.

Roh8Stha
  • 1
  • 1
  • the same answer has been given before. You better upvote (as soon as you have enough reputation) – slfan Sep 02 '19 at 05:41
0

you can rename the Solution Name and reopen the Project it solved for me after repairing the VS Installation