Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, May 19, 2017 9:39 AM
Hi,
after VS works for a while, it suddenly (sometimes after extension
update, sometimes without a visible reason) crashes on startup with a
messagebox "Unknown Error". I tried /safemode from DEV commandline -
same result.
I created al log file with /log xxx from DEV commandline. See the
excerpt below, please.
The problem occured multiple times on my and my colleagues work station.
We can delete the app settings and VS starts - of course we have to
configure it again. After a while - the same. We work with non admin
accounts. When we switch to another account, VS starts properly. Can
anybody help, please? We run into this issue since weeks.
....
<entry>
<record>29</record>
<time>2017/05/18 15:03:58.407</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Importing pkgdef file</description>
<path>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\master.pkgdef</path>
</entry>
<entry>
<record>30</record>
<time>2017/05/18 15:03:58.407</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Importing pkgdef file</description>
<path>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\ClassDesigner_REG_27921.3643236F_FC70_11D3_A536_0090278A1BB8.pkgdef</path>
</entry>
<entry>
<record>31</record>
<time>2017/05/18 15:03:58.407</time>
<type>Error</type>
<source>VisualStudio</source>
<description>Failed to process PkgDef file</description>
<hr>80070005 - E_ACCESSDENIED</hr>
<path>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\ClassDesigner_REG_27921.3643236F_FC70_11D3_A536_0090278A1BB8.pkgdef</path>
</entry>
<entry>
<record>32</record>
<time>2017/05/18 15:03:58.407</time>
<type>Error</type>
<source>VisualStudio</source>
<description>PkgDef loading aborted</description>
<hr>80070005 - E_ACCESSDENIED</hr>
</entry>
....
TIA
All replies (6)
Monday, May 22, 2017 2:46 AM | 3 votes
Hi Robert Flügge,
Welcome to MSDN forum.
In order to try to fix the issue, could you please:
- Navigate to c:\users\your user>\Appdata\Local\Microsoft\VisualStudio\15.0_4442be59
- You will see a file called vspdmc.lock, please delete it
- After deleting the file, please restart your computer and try running VS again
Meanwhile, in the same directory (c:\users\your user>\Appdata\Local\Microsoft\VisualStudio\15.0_4442be59) please try deleting the file privateregistry.bin.
>>We work with non admin accounts. When we switch to another account, VS starts properly.
Do you mean that the account is to login to computer?
You could also update visual studio 2017 t the latest version.
Best regards,
Joyce
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].
Monday, May 22, 2017 8:20 AM
Hi Joyce,
thank you for your reply. vspdmc.lock did not exist on my machine (I can see hidden and system files). I deleted privateregistry.bin and VS starts now. But all my VS settings are deleted! I wish, that you've mentioned that :(. I don't think, this is a suitable solution.
We've installed the latest updates on all machines.
>>Do you mean that the account is to login to computer?
We work with accounts, that have no local admin privileges. For tasks that require admin privileges (e.g. install Software or Update VS), we must elevate with a second account with admin privileges. I guess that this is part of the problem.
As mentioned earlier, this issue occures on each of our workstations (4 developer machines).Currently we spent upt to 1 hour a day for reconfiguring VS! I would be very pleased, if anyone had an advice.
TIA
Update: Not all settings where deleted. I can see, that the VS settings schema (C#, default, etc.) was resetted and some of my VS extensions where disabled (e.g. Resharper). So far it is a step forwards. I hope, you can find the root cause.
Tuesday, May 23, 2017 5:58 AM | 1 vote
Hi Robert Flügge,
I apologize for this. Before making changes to visual studio, you could export the current setting. Please click Tools->Import and Export Settings->Export selected environment setting.
You could find it in c:\users\administrator\documents\visual studio 2017\Settings. After this, you could import the settings by click Tools->Import and Export Settings->Import selected environment settings and then import your customized settings.
I find the issue has been submitted to Microsoft Product team, you could find it here. Visual Studio Team has given an update on the status of this problem and detailed analysis:
For "Unknown Error" starting VS on Windows 8.1 or Windows 10: This problem is not related to the private registry file. A fix for this problem is available now for the latest version of both Visual Studio 2017 (https://www.visualstudio.com/vs/) or Visual Studio 2017 Preview (https://www.visualstudio.com/vs/pre).
For "Unknown Error" starting VS or Access Denied on Windows 7:
Please try this work-around first, especially if the current user account is a member of the Administrators group on the machine.
- Close all Visual Studio instances
- Delete the file %LocalAppData%\Microsoft\VisualStudio\15.0_[ID]\vspdmc.lock
- Start Visual Studio again
If deleting vspdmc.lock does not work, we will need to reset the private registry file
- Export your current settings using Tools | Import and Export Settings... (this step is optional and may fail)
- Close all Visual Studio instances
- Delete %LocalAppData%\Microsoft\VisualStudio\15.0_f4938f75\privateregistry.bin file (The ID after 15.0_ may be different per machine)
- Start VS as an Admin user if the current user account is a member of the Administrators group on the machine. Otherwise start VS.
- Import your current settings back.
We've identified 2 potential issues with private registry file on Windows 7 and implemented fixes for them. The fix will be available first on Visual Studio 2017 Preview and we will notify the community when it is.
Best regards,
Joyce
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].
Tuesday, September 19, 2017 11:57 AM
Same issue here except that none of the fixes work. I am completely unable to work. I removed the whole VisualStudio folder from all profiles.
A Procmon trace shows access denied coming from the registry.
Monday, November 13, 2017 12:46 PM
Hi Robert,
I had this exact issue after installing an extension. Not sure if this is relevant but I found that running Visual Studio as an administrator fixed the issue for me.
Hope this helps,
Kerri
Wednesday, February 21, 2018 5:33 AM
Running VS with Admin Privileges (Run as Admin) solved my problem.