Visual Studio 2017 HRESULT: 0x80070005 / E_ACCESSDENIED on project creation


I'm running Visual Studio 2017, version 15.0.0+26228.9

enter image description here

When I'm trying to create a new project via File > New > Project... in Visual Studio 2017, I'm receiving the following error message and the project is not created:

Access denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Don't mind the german message text in the screenshot: Exception message on project creation

This happens for every project template I use (e.g. C# WPF, VB WPF, C# Console App...).

If I try to create a project via the quick search box on the starting page of visual studio, VS just crashes instantly with no exception message at all:

Quick search project template box

Has anybody else ran into this issue and might know how to fix it?

asked on Stack Overflow Mar 20, 2017 by M463

7 Answers


I had the same error. I solved it by following the procedure :

  • Shutdown all instances of Visual Studio
  • Delete %LocalAppData%\Microsoft\VisualStudio\15.0_f4938f75\privateregistry.bin file (the ID after 15.0_ may be different per machines)
  • Start VS as normal user

all credit for this should go to


Ok, I fixed it. Long story short, the reason for the problem was an incomplete and/or corrupted setup.

But it was a rather bumpy road to the solution, including several un-installations and re-installations until I eventually figured out why the setup was indeed faulty.

Sometimes I got an exception during the installation, other times it finished just fine, but the HRESULT-error persisted when I tried to create a new project.

I my special case, this was caused by the corporate firewall, that blocked some of the setup packets from being downloaded by the web installer. I solved the issue by connecting to an open WiFi, that's not filtered by the firewall.

As I'm working with a standard user, UAC kicks in when I start any installation routine. When I first started the setup via UAC and connected to the free WiFi, it wasn't able to find the packet servers. It took me a minute to realize that the admin user I used for UAC had his own internet proxy settings, that wouldn't work with the open WiFi.

After I logged on as administrator, disabled the proxy and logged on as my main user again, I ran the setup again - and it failed again with a bunch of "incomplete workload" messages. As frustrated as I was at this point, I simply ran it again via the "Change" button without even closing the webinstaller and this time it finally completed without any errors!

After this, I could start VS just normally and creation of a new project was possible.

So, if you experiencing any troubles like this, I would strongly recommend to run a "Repair" or "Change" installation just over your existing one but try to avoid any firewalls between you and the internet.

answered on Stack Overflow Mar 21, 2017 by M463

1/ open control panel -> program and future - > IIS Express -> select Repair

2/ Refresh some time -> open Visual Studio

This 's about IIS Express in your computer . you only need to repair it in control panel is ok .

I tried and success.

answered on Stack Overflow Mar 4, 2018 by jun

My solution,

The Clang-format caused this. just disable clang-format:

Options->Text Editor->C/C++->Formatting->General->Eable ClangFormat Support

answered on Stack Overflow Aug 20, 2018 by Zhang

I had the same error when I tried to create a test certificate. I have just launched VS as administrator. And everything is Ok

answered on Stack Overflow Feb 23, 2021 by landrypro

The below solution worked for me

  • Make sure all the instances of Visual studio are closed.
  • Go to %LocalAppData%\Microsoft\VisualStudio\15.0_****
  • Delete the file privateregistry.bin
answered on Stack Overflow Jul 7, 2017 by user1531840 • edited Jan 3, 2018 by Rahul Gupta

I tried changing the version of .Net Framework from 4.0 to 3.5 while creating the project. This solved my error. enter image description here

Changing version of Net Framework

answered on Stack Overflow Jul 1, 2020 by imamkb

User contributions licensed under CC BY-SA 3.0