Microsoft Edge

Try Microsoft Edge

A fast and secure browser that's designed for Windows 10 Get started

This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more
Microsoft Microsoft
    • .NET
      • Apps
      • Internet of Things
      • Mixed Reality
      • Microsoft Edge
      • Hardware
      • IT Center
      • What is Azure
      • Products
      • Solutions
      • Pricing
      • Create a free account
      • Visual Studio
      • Visual Studio IDE
      • Visual Studio Team Services
      • Visual Studio Code
      • Xamarin
      • Visual Studio Dev Essentials
      • Subscriptions
      • Office Dev Center
      • Office 365 for IT pros
    • Microsoft Graph
      • Store
      • Cortana
      • Bing
      • Application Insights
      • .NET
      • Microsoft Azure
      • Microsoft Graph
      • Visual Studio
      • Visual Studio Team Services
      • Windows
      • Office
      • All Developer Centers
    • TechNet
    • Microsoft Developer Network
      • Windows IT Center
      • Office 365 for IT Pros
      • All IT TechCenters
      • Microsoft Download Center
      • Microsoft Azure
      • Visual Studio
      • SDKs
      • Windows
      • Office
      • Microsoft Graph
      • MSDN
      • Azure
      • Windows
    • PowerShell scripts
      • Microsoft Azure
      • Visual Studio
      • Visual Studio Team Services
      • Developer tools
      • Office Dev Blog
      • Server & management
      • Windows
      • Developers
      • TechNet
      • Microsoft Tech Community
      • Visual Studio (MSDN) subscriptions
      • Microsoft Cloud Essentials
      • Microsoft Virtual Academy
      • IT Pro Career Center
    • Microsoft Evaluation Center
    • Channel 9
    • No results
    Sign in
    Developer Community Status
    Visual Studio

    Developer Community

    Get help from our community supported forum
    Visual Studio Visual Studio for Mac .NET C++ VSTS TFS
    All Products
    • Visual Studio
    • Visual Studio for Mac
    • .NET
    • C++
    • VSTS
    • TFS
    Report a problem
    • for Visual Studio
    • for Visual Studio for Mac
    • for .NET
    • for C++
    • for VSTS
    • for TFS
    Report an issue in Visual Studio Installer or Visual Studio
    This allows diagnostic information about the program to be included in your report
    1. Installer or Visual Studio
    2. Report a Problem
    3. Type and Submit
    Available on Visual Studio 2017, Installer, and newer releases
    Would you like to know more?
    • Home /
    • Visual Studio /
    avatar image
    37

    Access Denied error creating registry keys on Windows 7

    Reported by Didier Grimaud Jul 13, 2017 at 04:02 PM Visual Studio 2017 version 15.2Fixed in: Visual Studio 2017 version 15.5 Preview 4fixed in: visual studio 2017 version 15.5Setupidewindows 6.1

    I must admit that of all Visual Studios I have used since 2002 (all of them) 2017 has been the only one with which I have had a bad user experience, it seems as if it was not ready for release because it is supposed to be a productivity tool while developing but the problems are so common and often that one finds oneself spending time getting around issues or sending reports.

    I have Windows 7 Ultimate x64 and run (always except for s/w installation) as a Restricted User account.

    So, I ran the latest update to VS.2017 and with that come the usual problems of things not working. Prior to the update I had installed 3 Extensions:

    - Bundler & Minifier
    - SQLite Compact Toolbox
    - Markdown Editor

    After the update those three extensions suddenly appeared as DISABLED. No warning was given during the update regarding an anomaly. When I go into the Tools | Extensions menu I see the listing of currently installed extensions, and among those the three named above except those three are somehow disabled (the others aren't, they were there by default).

    Now, if I click on the ENABLE button for any of those disabled extensions I get a very communicative small error dialog (modal) saying Access Denied and then some integer number, no suitable information to give the user a clue as to WHAT has been denied.

    The only thing I could do without getting that meaninful error box was to click (with much trepidation!) on the UNINSTALL button which marked them for deinstallation. I was prompted to exit VS.2017 to complete uninstall.

    I exited VS.2017 and a dialog popped up (as expected) indicating it was about to unistall some extensions. Then it asked for my password (I run as a RESTRICTED ACCOUNT) then it started unistalling the extension and somewhere during the progress bar on the dialog the dreaded error poped up saying it was unable to unistall due to some access denied. Luckily this other dialog DOES show a link to show you the LOG file which I did and hope to attach to this report.

    So, I cannot enable an extension after the update, I cannot complete uninstall of an extension and cannot install one either!

    thub.nodes.view.add-new-comment
    Add comment Show 17
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Huy Nguyen [MSFT] · Jul 19, 2017 at 03:03 PM 0
    Share

    Thank you for reporting this issue. We are actively investigating this problem with creating registry key on Windows 7 and would really appreciate your help to identify the root cause.

    We have released fixes to avoid known problems with private registry file on Windows 7. To make sure we start with a clean registry file, please do the following:

    - Export your current VS settings with Tools | Import and Export Settings… because the next step will lose custom settings and extensions
    + (If the registry is corrupted, export settings may fail and we have to ignore this step)
    - Delete VS app data: %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID].
    + If your account is part of the Administrators group, launch Visual Studio as Administrator once. You can continue to run as Standard User afterwards.
    + Otherwise, launch Visual Studio as Standard User.

    If after this you're still experiencing Access Denied error with registry operation, please run the attached program to collect information about the private registry hive:
    - Download the attached program.txt
    - Launch a "Developer Command Prompt for VS 2017"
    - Run "csc Program.txt /target:exe"
    - Look for the private registry file under %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID], the file name should be privateregistry.bin or privateregistry.user.bin
    - Run Program.exe and enter the path to %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID]\privateregistry.bin or %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID]\privateregistry.user.bin

    - Share the generated result.txt. You can reply and attach the file.

    Unfortunately the current work-around is to export settings / delete the private registry file / import settings and try again.

    program.txt (10.7 kB)
    attachfile.png (8.8 kB)
    avatar image Huy Nguyen [MSFT] · Jul 19, 2017 at 03:31 PM 0
    Share

    Thank you for reporting this issue to us. We have changed the title to better describe the problem so others can find and engage with it

    avatar image TranstecJason · Aug 23, 2017 at 02:03 PM 0
    Share

    All sorts of problems:

    A few days ago I installed 15.3.1 and deleted the 15.0_blah folder. Today I tried to create a new project. As in the previous thread, New Project window has no templates the first time. The second time has templates, but clicking OK does nothing.

    I just updated to 15.3.2, and now I get this when attempting to launch VS:

    Package management initialization failed: Access Denied.
    You can get more information by examining the file:
    C:\Users[username]\AppData\Roaming\Microsoft\VisualStudio\15.0_e6550fb3\ActivityLog.xml

    File is attached. Oddly, I now have three 15.0_blah folders. Now I have no working Visual Studio. Do I just delete the three 15.0 folders?

    EDIT 1: Deleted all 15.0 folders. Still cannot launch as a standard user. Receive same error. Running as administrator works.

    EDIT 2: I apparently have two Visual Studio's now. 1.10.30642.0 and 1.11.33287.817

    activitylog.zip (2.0 kB)
    avatar image Huy Nguyen [MSFT] TranstecJason · Aug 23, 2017 at 04:15 PM 0
    Share

    Hi TranstecJason,

    The two entries of Visual Studio in Add Remove Program is a bug and a fix will be available in a future release.

    If you only have 1 installation of Visual Studio, you should have only one 15.0_e6550fb3 folder. Would you please let me know the names of the other 2 folders?

    After deleting the private registry file, if you start Visual Studio as Administrators, then after that start Visual Studio as Standard User, do you still get Access Denied? That is unexpected.

    For more details: we are calling RegLoadAppKey to create VS private registry file. However, on Windows 7, the default behavior is very restrictive:
    - The keys are created with explicit permissions to the current user, and permissions are not inherited from parent keys to sub keys. This is fixed with Windows 8 and above.
    - All the keys in the private registry hive must have the same permissions
    So if VS can be launched as Administrators and there are no privateregistry.bin file, we will take advantage of Administrators privilege and copy a keys under HKCU with the correct permission set that will work for both Administrators and Standard Users. So launch once as Administrators after deleting private registry should set the registry file in a good state.

    avatar image TranstecJason Huy Nguyen [MSFT] · Aug 23, 2017 at 04:24 PM 0
    Share

    The three folders were titled:

    15.0_f03a4018

    15.0_e6550fb3

    15.0_a24e8854

    After deleting those, attempting to start VS resulted in one copy of 15.0_e6550fb3. I have not received an Access Denied message box, though that error does appear in the activity log. I assume I attempted to start VS again as a standard user after trying as an admin, but I don't recall. That never worked in the past.

    I uninstalled VS 2017 and installed 15.3.2 from scratch because I have to get work done. That worked, but I don't know for how long. In the past, updating VS makes in unopenable.

    avatar image Richard Brown · Aug 24, 2017 at 06:39 PM 0
    Share

    @Huy Nguyen [MSFT] I received the dreaded Access Denied error today when trying to add a new class to a project. I am currently running VS2017 15.3.1. I ran the registry program against my privateregistry.user.bin and have attached the results.

    result.txt (3.4 kB)
    avatar image Florian · Sep 13, 2017 at 07:44 AM 0
    Share

    Hi, came by here via link in a more matching topic - it was closed as duplicate, even so I am not sure how this could be a duplicate, because what is described down here does not seem to match, @Huy Nguyen [MSFT]

    It happens on the latest Release VS2017 Enterprise (15.3.3), freshly installed, no update, while starting with an account with no administrator privileges and I receive a message box "unknown error", nothing more specific as described here. It happens on the second use with that account (user logged off once). The only thing I've done on the first run in the IDE was to change the language to english, build a project and closed it.
    Deleting those private registry file as described here does not help.
    Will try a repair installation next.

    avatar image Huy Nguyen [MSFT] Florian · Sep 13, 2017 at 07:53 AM 1
    Share

    Hi,

    For 15.3.3, a registry access denied error should result in a better error message - Package management initialization failed: Access Denied. If the error is Unknown Error, it should be a different error and would explain why deleting the private registry file did not help.

    Would you please open a different feedback item and attach the activity log file (the error message should have a path to the file) when this Unknown Error happened?

    Thanks!

    avatar image Florian Huy Nguyen [MSFT] · Sep 13, 2017 at 09:20 AM 0
    Share

    Will do so, if the repair installation won't fix the issue.
    Thanks for the clarification, that it might be possible to report this, without getting it closed as duplicate.

    Show more comments
    avatar image Kevin Freestone · Oct 03, 2017 at 09:56 PM 0
    Share

    I've tried everything I've read and cannot run 2017 Enterrprise 15.3.5 on a Windows 7 machine with standard user privileges. I can run it with a local admin, but when I try to check in changes it apparently doesn't remember that I'm signed in to TFS with a domain account and gives me the "Login failure" error.

    So we really need to be able to run this as a standard user.

    avatar image Kris Akins · Oct 23, 2017 at 03:01 PM 1
    Share

    This happens every time I update Visual Studio Versions. I've gotten to where I don't even want to update, because each time I have to go and delete my private registry file, and reinstall Resharper and reconfigure settings.

    avatar image Anson Horton ♦♦ · Nov 12, 2017 at 10:29 PM 0
    Share

    Thank you for your feedback! We have fixed the problem in an upcoming release. Thank you for helping us build a better Visual Studio!

    avatar image Blair Wang-MSFT ♦ · Nov 15, 2017 at 02:15 AM 0
    Share

    The fix for this is now in our latest Visual Studio Preview release. If you'd like to try out the fix, you can access the preview build here: https://www.visualstudio.com/vs/preview

    avatar image Marcello Romani · Nov 25, 2017 at 03:33 PM 0
    Share

    Been bitten by this annoying error, I do appreciate the help effort here (still in the process of fixing it myself). That said, I couldn't help but think "here we go, another regsitry problem"

    https://blog.codinghorror.com/was-the-windows-registry-a-good-idea/

    Show more comments

    Solutions

    · Add your solution
    avatar image
    4

    Added a solution by Erik Krane Langhaug · Aug 25, 2017 at 08:36 AM

    I am running Visual Studio 2017 15.3.2 and I just encountered this issue a second time. The first time I didn't bother posting, it was when updating to 15.3 from 15.2, and I "solved" it by deleting the privateregistry.user.bin file.

    And the same thing solved it this time.

    I also have the same kind of user account scenario - my regular user is a domain user WITHOUT admin privileges on my workstation. For when I need it, I have a machine local administrator account that I use in order to install software and otherwise.

    OS is Windows 7 Enterprise

    thub.nodes.view.add-new-comment
    Add comment · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image
    2

    Added a solution by Petr Petyovský · Aug 18, 2017 at 02:05 PM

    Hi Huy.

    Today I update VS 2017 to the your most recent build 15.3:

    When I start VS like admin everything works just fine, but when I try to start VS like normal user I get this NEW message window:

    Package management initialization failed: Access Denied.

    You can get more information by examining the file: C:\Users\xxxxxx\AppData\Roaming\Microsoft\VisualStudio\15.0_ec8ebbf4\ActivityLog.xml

    It's better that Unknown error message window in the previous VS2017 builds, but it's time to solve this problem once and for all.

    There is result of your C# program in the file result.txt that you want:

    Exception from execution: System.IO.FileNotFoundException: Private hive does not exist.

    File name: '%LocalAppData%\Microsoft\VisualStudio\15.0_ec8ebbf4\privateregistry.bin|privateregistry.user.bin' at PrivateRegistryTest.Program.GetPrivateHiveFilePath() at PrivateRegistryTest.Program.Execute()

    Please, can you consider to prepare some hotfix for this "VS2017's win7 update issue", otherwise VS2017 is unusable on win7. We are planned to install VS2017 to all lab PCs in our university for this semester. But without solving this issue we cannot!!

    This looks like serious problem, no just some issue (delete couple of files and everything is fine).

    We are simply cannot delete VS app data: "%LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID]" for all my student on all my lab computers, every time when you are release new VS 2017 build.

    We need hotfix ASAP, because new semester coming, otherwise all our labs must stuck in the VS2015, and it will be shame for all your VisualStudio team, because every student will ask me why is on the lab installed old VS2015 only.

    BTW: Export your current VS settings with Tools | Import and Export Settings is unachievable task, because VS2017 simply don't start.

    PS: Don't hesitate to contact me for more information.

    Regards,

    petyovsky@feec.vutbr.cz

    ,

    Hi Huy.

    Some result when I update to VS2017 (15.3)

    Package management initialization failed: Access Denied.

    You can get more information by examining the file: C:\Users\xxxxxx\AppData\Roaming\Microsoft\VisualStudio\15.0_ec8ebbf4\ActivityLog.xml

    There is content of your result.txt that you want:

    Exception from execution:
    System.IO.FileNotFoundException: Private hive does not exist.
    File name: '%LocalAppData%\Microsoft\VisualStudio\15.0_ec8ebbf4\privateregistry.bin|privateregistry.user.bin'
      at PrivateRegistryTest.Program.GetPrivateHiveFilePath()
      at PrivateRegistryTest.Program.Execute()

    Please, can you consider prepare some hotfix for this "VS2017's win7 update issue", otherwise VS2017 is unusable on win7.

    We are planned to install VS2017 to all lab PCs in our university for this semester. But without solving this issue we cannot!!

    This looks like serious problem, no just some issue (delete couple of files and everything is fine).

    We are cannot delete VS app data: "%LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID]" for all my student on all my lab computers, everytime when you release new VS 2017 build.

    We need hotfix ASAP, because new semester comming.

    BTW: Export your current VS settings with Tools | Import and Export Settings is unachievable task, because VS2017 simply don't start.

    Regards,

    Peter

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Huy Nguyen [MSFT] · Aug 22, 2017 at 09:23 PM 1
    Share

    Hi, would you please try deleting VS local app data once and starting VS with the right permissions on Windows 7?

    - Delete VS app data: %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID].
    + If your account is part of the Administrators group, launch Visual Studio as Administrator once. You can continue to run as Standard User afterwards.
    + Otherwise, launch Visual Studio as Standard User.

    In 15.3, a change was made to separate the private registry file for users using VS in mixed Administrator / Standard User privileges. That change may require deleting the VS app data folder once. But subsequent updates should not cause the problems.

    We're actively investigating the new registry corruption issue on Windows 7.

    avatar image
    1

    Added a solution by Javidan Guliyev · Aug 23, 2017 at 12:53 PM

    Hi. After updating to latest build, I cannot open VS2017 with admin privileges even. How to downgrade to previous build?

    activitylog.txt

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Huy Nguyen [MSFT] · Aug 23, 2017 at 03:28 PM 1
    Share

    Hi Javidan, please try to delete the corrupted private registry file
    - Go to %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID] - [UniqueID] is different per installation
    - Delete privateregistry.bin or privateregistry.user.bin file

    The registry changes were ported to VS 2017 15.2 and 15.3, so downgrading to previous build will not change the registry behavior on Windows 7. We are investigating the new corruption issue on Windows 7 at the moment.

    avatar image
    1

    Added a solution by Roland Steiner · Aug 25, 2017 at 10:17 AM

    Same issue here, with an Access Denied dialog on startup, and corresponding entry in ActivityLog.xml:

    <entry>
        <record>29</record>
        <time>2017/08/25 09:48:50.306</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>Failed to process PkgDef file</description>
        <hr>80070005 - E_ACCESSDENIED</hr>
        <errorinfo></errorinfo>
        <path>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\ClassDesigner_REG_27921.3643236F_FC70_11D3_A536_0090278A1BB8.pkgdef</path>
      </entry>

    This issue persists for quite a while now (previously the "Unknown Error" issue on startup), and forces me to delete privateregistry.bin every single time, losing my settings.

    (Win 7, non-Admin account.)

    On a related note: Why is it that the keyboard shortcuts are not affected, while editor settings are?

    thub.nodes.view.add-new-comment
    Add comment · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image
    1

    Added a solution by Michel Capdevila · Sep 30, 2017 at 07:26 PM

    I have VS 15.3.5 and even deleting privateregistry.user.bin & privateregistry.bin is working until next vs start, losing all the settings and previously enabled extensions is not suitable for a professional product. furthermore I cannot launch VS with Administrative privilege even by deleting private registry bin, as a consequence none of vsix extension that require admin privileges can be installed, SSDT in particular. Very disappointing from Microsoft.

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Michel Capdevila · Oct 02, 2017 at 07:19 PM 0
    Share

    The following event "An I/O operation initiated by the Registry failed unrecoverably.The Registry could not flush hive (file): '\??\C:\Users\L008078\AppData\Local\Microsoft\VisualStudio\15.0_72c42306\privateregistry.user.bin'." fires every time VS is Starting.

    avatar image
    1

    Added a solution by Radames Cruz Moreno · Oct 03, 2017 at 10:34 PM

    To all people having this problem, we would appreciate if you can please try the following workaround:

    • Make sure you are logged in as the regular non-elevated user you use for running Visual Studio
    • Export your current VS settings with Tools | Import and Export Settings..., as the next steps will cause your settings to be lost
    • Download the attached workaround.txt
    • Launch a "Developer command prompt for VS 2017"
    • Run "csc Workaround.txt /target:exe"
    • Run Workaround.exe and add as a parameter the directory where your privateregistry.bin file resides. For example: "workaround.exe c:\users\<user>\appdata\local\Microsoft\VisualStudio\15.0_[UniqueID]"
    • The program will prompt for elevation credentials, and after you provide them will create a new empty "privateregistry.bin" file in the directory that was provided as a parameter.

    After this you should be able to start Visual Studio and use it normally, and we expect that you will not see the "Access Denied" error again. Please do let us know if this workaround does not work for you, as well as if you still experience the problem after using the workaround.

    As Huy has mentioned before, we are actively investigating the root cause for this issue.

    thub.nodes.view.add-new-comment
    Add comment Show 31 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Kevin Freestone · Oct 03, 2017 at 10:48 PM 0
    Share

    I get the unknown error when trying to launch after trying the workaround.exe. Here are the last 2 entries in ActivityLog.xml:

    <entry> <record>6</record> <time>2017/10/03 22:46:44.499</time> <type>Error</type> <source>VisualStudio</source> <description>Failed to initialize Registry Root Hive</description> <hr>800703f1</hr> </entry> <entry> <record>7</record> <time>2017/10/03 22:46:44.499</time> <type>Warning</type> <source>VisualStudio</source> <description>Unable to initialize cache</description> <hr>800703f1</hr></entry>

    avatar image Radames Cruz Moreno Kevin Freestone · Oct 03, 2017 at 11:23 PM 0
    Share

    Hi Kevin,

    Could you please attach the full activitylog.xml file?

    Thank you.

    avatar image Kevin Freestone Radames Cruz Moreno · Oct 04, 2017 at 05:33 AM 0
    Share

    Sure thing. Sorry about the delay.

    activitylogxml.txt

    activitylogxml.txt (3.7 kB)
    avatar image Radames Cruz Moreno Kevin Freestone · Oct 03, 2017 at 11:38 PM 0
    Share

    Hi again Kevin,

    The error code that you posted would indicate that the registry is corrupt. Since the program creates a new file on disk, I'm thinking it might be one of the supporting files for the old file: Windows creates a couple of hidden files to support app hives (privateregistry.bin.LOG1, privateregistry.bin.LOG2 for example).

    In order to rule this out, can you please try:

    • Renaming your 15.0_[UniqueID] directory to something else
    • Creating a new 15.0_[UniqueID] empty directory
    • Running the workaround program again on the empty directory

    Thank you.

    avatar image Kevin Freestone Radames Cruz Moreno · Oct 04, 2017 at 05:35 AM 0
    Share

    Tried that and got the same error. Attached activitylog.

    activitylogxml.txt

    activitylogxml.txt (3.7 kB)
    Show more comments
    avatar image bjoern · Oct 04, 2017 at 09:05 AM 0
    Share

    The workaround ran without any errors. So far I'm able to use VS again without "access denied" etc messages. What is the expected outcome? Do I have to run this workout every time the bug is back (it wouldn't be better than deleting the reg file then) or do you hope that the bug is gone now?

    avatar image Radames Cruz Moreno bjoern · Oct 04, 2017 at 04:41 PM 0
    Share

    Hi,

    The expectation is that the problem will not appear again. The workaround is meant to create a new privateregistry.bin with the correct set of permissions that we hope will prevent this issue from happening.

    We continue to investigate the root cause for this failure. If the workaround works as we expect it will be very helpful in our investigation, please do let us know if you find any issues after applying it.

    Thank you.

    avatar image bjoern Radames Cruz Moreno · Oct 16, 2017 at 11:37 AM 0
    Share

    Hi Radames,

    just a thumps up from me: the workaround still works for me. This is the longest time I ever had without any errors from VS.

    Show more comments
    avatar image Michel Capdevila · Oct 06, 2017 at 05:07 PM 0
    Share

    I tried the workaround with all possible combinations (deleting private registry file, 15_0[DUID] , etc., but nothing is working. The only way for me to start VS is deleting all privateregistry.user.bin & privateregistry.bin but every time vs is starting the event log says: "An I/O operation initiated by the Registry failed unrecoverably.The Registry could not flush hive (file): '\??\C:\Users\xxxxx\AppData\Local\Microsoft\VisualStudio\15.0_72c42306\privateregistry.user.bin'."

    avatar image Radames Cruz Moreno Michel Capdevila · Oct 09, 2017 at 07:46 PM 0
    Share

    Hi Michel,

    Could you please tell us what is the output you see when you run the workaround? It would be specially helpful if you:

    1. Delete the %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID] directory

    2. Create an empty %LocalAppData%\Microsoft\VisualStudio\15.0_[UniqueID] directory

    3. Run the workaround pointing to the empty directory

    Thank you,

    -Radames

    avatar image Michel Capdevila Radames Cruz Moreno · Oct 10, 2017 at 04:15 PM 0
    Share

    Hi Radames, no luck, always the same

    Show more comments
    avatar image Slav Bukhal · Oct 10, 2017 at 08:41 PM 0
    Share

    vs-workaround.png The workaround flooded me with cmd windows and wouldn't stop creating them until i managed to kill the process. Needless to say still can't run my Visual Studio as regular account.

    vs-workaround.png (497.0 kB)
    avatar image Radames Cruz Moreno Slav Bukhal · Oct 12, 2017 at 09:48 PM 0
    Share

    Hi Slav,

    Did you get prompted to enter an administrator user / password when you ran the workaround?

    Thank you,

    -Radames

    avatar image Slav Bukhal Radames Cruz Moreno · Oct 12, 2017 at 10:04 PM 0
    Share

    Hi Radames,

    I was not prompted to enter credentials. The program was just creating new console windows in an infinite loop.

    Show more comments
    avatar image
    1

    Added a solution by Przemyslaw Seneczko · Sep 13, 2017 at 07:07 PM

    Same here, but also in 15.3.4. Windows 7, devenv run from standard user account.

    Happened for the first time ever, after upgrading from 15.3.3 (or maybe 15.3.2, not sure) Package management initialization failed: Access Denied.

    Fixed after deleting local app data\15.0_unique

    <entry> <record>29</record> <time>2017/09/13 18:43:07.127</time> <type>Error</type> <source>VisualStudio</source> <description>Failed to process PkgDef file</description> <hr>80070005 - E_ACCESSDENIED</hr> <errorinfo></errorinfo> <path>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\DSLTextTemplatingRegistry_x86.pkgdef</path> </entry>

    <entry> <record>30</record> <time>2017/09/13 18:43:07.127</time> <type>Error</type> <source>VisualStudio</source> <description>PkgDef loading aborted</description> <hr>80070005 - E_ACCESSDENIED</hr> <errorinfo></errorinfo> </entry> <entry> <record>41</record> <time>2017/09/13 18:43:07.129</time> <type>Error</type> <source>VisualStudio</source> <description>Failed to process PkgDef file</description> <hr>80070005 - E_ACCESSDENIED</hr> <errorinfo></errorinfo> <path>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\DSLTextTemplatingRegistry_x86.pkgdef</path> </entry>

    <entry> <record>42</record> <time>2017/09/13 18:43:07.129</time> <type>Error</type> <source>VisualStudio</source> <description>PkgDef loading aborted</description> <hr>80070005 - E_ACCESSDENIED</hr> <errorinfo></errorinfo> </entry>

    <entry> <record>43</record> <time>2017/09/13 18:43:07.129</time> <type>Error</type> <source>VisualStudio</source> <description>Error or timeout while initializing non-volatile pkgdef cache</description> <hr>80070005 - E_ACCESSDENIED</hr> <errorinfo></errorinfo> </entry>

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Florian · Sep 18, 2017 at 08:37 AM 0
    Share

    I wonder why this helped as it does not help after trying it on our machine. I am still getting Access Denied errors for every PkgDef file. I also elevated the account, to start it as administrator, did not helped.

    avatar image
    1

    Added a solution by hilmar frank · Sep 20, 2017 at 04:44 PM

    Hello,

    would love to provide a solution, but can only report that things did not improve with 15.3.5 i just updated to.

    Administrative users don't have an issue, all others do.

    I wonder whether a solution is under investigation, since it is not sustainable to start from scratch each time updates are applied. Refraining from updating the application will render it obsolete sooner or later.

    Currently this keeps me from getting really "invested" into VisualStudio, as i can't tell whether this will work for me on the long...

    Please help!

    Thanks in advance.

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Huy Nguyen [MSFT] · Sep 20, 2017 at 04:56 PM 0
    Share

    Hi,

    We are still investigating a fix for this problem. So far we noticed that when the private registry file is created as a Standard User, certain keys may be created with a different permission set (only different on a 'session' user). However, this seems to only corrupt the registry file randomly. We think we have a repro now and will engage with Windows team to investigate the issue. Our latest attempt to force the permission set to be the same as the root key failed because of Windows 7 restriction as well. We are looking at other work-around and will update this report when we have any new information.

    avatar image
    0

    Added a solution by Ronald Mar · Sep 23, 2017 at 11:07 PM

    I've discovered a temporary workaround. It's a little onerous, but it does work. Basically, I temporarily changed my user profile to admin and rebooted. Then, re-ran vs_Community.exe and selected repair; when done, reboot as directed. Then, still temporarily as admin, ran VS2017 to initialize the settings. Every seemed to work. Then, I changed my account type back to standard and rebooted. VS2017 runs normally again.

    1. Change user profile to admin and reboot.
    2. Run vs_Community.exe and select repair from the dropdown. (This will take a while.)
      1. Reboot after complete.
    3. Still as admin, run VS2017.
      1. The settings should be initialized correctly for your account now.
    4. Change user profile back to standard and reboot.
    5. VS2017 should now run correctly as a standard user.

    Edit: I should add that I'm using 15.3.5.

    thub.nodes.view.add-new-comment
    Add comment Show 1 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Ken Chan · Sep 26, 2017 at 10:25 AM 0
    Share

    Sigh ... The same problem comes back after some time...

    avatar image
    0

    Added a solution by Ronald Mar · Oct 12, 2017 at 10:14 PM

    I just updated to 15.4.0 and the problem seems to be fixed.

    thub.nodes.view.add-new-comment
    Add comment Show 6 · Share
    10 |10000 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Slav Bukhal · Oct 12, 2017 at 10:17 PM 0
    Share

    I am still having the problem with 15.4.0

    avatar image Thomas Schmeelke · Oct 18, 2017 at 12:07 PM 0
    Share

    I am also still having the problem with 15.4.0 activitylog.txt

    activitylog.txt (4.3 kB)
    avatar image Radames Cruz Moreno Thomas Schmeelke · Oct 18, 2017 at 05:59 PM 0
    Share

    Hi Thomas,

    Have you tried the workaround posted here? If you do, please let us know if it works for you.

    Thank you,

    -Radames

    avatar image Thomas Schmeelke · Oct 19, 2017 at 05:57 AM 0
    Share

    Hi Radames,

    I tried the postet workaround, but I still have the problem.

    Here is the result.txt from your program.exe. I execute your program on both privateregistry.bin and privateregistry.user.bin folders. Both with the same result.

    result.txt

    result.txt (284 B)
    avatar image Radames Cruz Moreno Thomas Schmeelke · Oct 20, 2017 at 08:03 PM -1
    Share

    Hi Thomas,

    Thank you for attaching the file.

    Just to make sure, are the steps below the ones you followed? Note that the workaround is called "workaround.exe".

    • Make sure you are logged in as the regular non-elevated user you use for running Visual Studio
    • Export your current VS settings with Tools | Import and Export Settings..., as the next steps will cause your settings to be lost
    • Download the attached workaround.txt
    • Launch a "Developer command prompt for VS 2017"
    • Run "csc Workaround.txt /target:exe"
    • Run Workaround.exe and add as a parameter the directory where your privateregistry.bin file resides. For example: "workaround.exe c:\users\<user>\appdata\local\Microsoft\VisualStudio\15.0_[UniqueID]"

    The program will prompt for elevation credentials, and after you provide them will create a new empty "privateregistry.bin" file in the directory that was provided as a parameter.

    Thank you,

    -Radames

    avatar image Thomas Schmeelke Radames Cruz Moreno · Oct 23, 2017 at 06:28 AM 0
    Share

    Hi Radames,

    yes, this is the sequence which I followed.

    BR,

    Thomas

    • 1
    • 2
    • ›
    Follow

    256 People are following this

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    Related Problems

    VS Not responding when creating new ASP.Net webforms project or loading existing solution.
    2 Solution

    VS installation error Return code 5100
    0 Solution

    When I click on the highlight file in the Solution Explorer in Visual Studio, nothing happens
    1 Solution

    login Window do nothing
    1 Solution

    Opening a file - windows claims it is in use.
    0 Solution

    Visual Studio crashes unexpectedly
    0 Solution

    Using 'Open With' to open a custom file type with a (default) custom editor (as XML) stays set even though it was not set as the default.
    0 Solution

    VS2017 Setup operation failed
    1 Solution

    Extensions not installing after download
    0 Solution

    Why I can't install Profiling tools for Visual Studio 2017 on Windows 7 Unltimate x64
    1 Solution

    Popular
    • Windows Dev Center
    • Microsoft Azure
    • Microsoft Visual Studio
    • Office Dev Center
    • ASP.NET
    • IIS.NET
    Learning Resources
    • Channel 9
    • Windows development videos
    • Microsoft Virtual Academy
    Programs
    • Microsoft developer program
    • Windows Insider program
    • Microsoft Affiliate program
    • BizSpark (for startups)
    • Microsoft Imagine
    For IT Pros
    • Microsoft Power BI
    • Microsoft SQL Server
    • Internet of Things
    • Operations Management Suite
    English (United States)
    • Contact us
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • About our ads
    • © Microsoft 2018
    • Anonymous
    • Sign in
    • Spaces
    • Visual Studio
    • Visual Studio for Mac
    • .NET
    • C++
    • VSTS
    • TFS
    • Explore
    • Topics
    • Problems
    • Users
    • Badges