Visual Studio hanging when adding new item to project, if not launched as administrator

Atchoum 116 Reputation points
2020-10-08T21:39:28.027+00:00

Anyone knows why I would have to run Visual Studio (community 2019) as administrator to be able to add items to an existing project? Every time I go to Project > Add New Item..., VS hangs. When I start VS as administrator, I don't have this issue.

VS2017 is installed on that same machine and I don't have this issue.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,108 questions
0 comments No comments
{count} votes

Accepted answer
  1. Atchoum 116 Reputation points
    2020-11-06T02:51:36.95+00:00

    I finally found the problem. No access to C:\Users\prg01\.templateengine

    Filename Process ID Process Name Operation Error Code Error Description Error Count First Error Time Last Error Time Response Time Process Path
    C:\Users\prg01\.templateengine\vs 16044 devenv.exe Open File 0xc0000022 {Access Denied}
    A process has requested access to an object, but has not been granted those access rights.
    3 2020-11-05 9:42:55 PM 2020-11-05 9:42:55 PM 0.007 ms C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 28,761 Reputation points Microsoft Vendor
    2020-10-09T03:33:18.347+00:00

    Hi Atchoum,

    How long does the Visual Studio hang last? Could you tell me if the situation occurs in specific project? You can create different projects and check if Visual Studio hangs.

    If you have some extensions installed on your computer, please temporarily disable or uninstall them. In addition, you can try to repair your Visual Studio via running the Visual Studio Installer > More > Repair.

    Sincerely,
    Anna

    0 comments No comments

  2. Atchoum 116 Reputation points
    2020-10-09T03:38:56.427+00:00

    Hi Anna,

    It lasts forever (as far as I can tell). It is not specific to a project and I already disabled all extensions to no avail. I even completely uninstalled VS and reinstalled it. Some issue.


  3. Anna Xiu-MSFT 28,761 Reputation points Microsoft Vendor
    2020-10-16T09:39:44.53+00:00

    Hi Atchoum,

    Please check if you have corresponding permission to access the use templates:

    1. View your user templates location in Tools > Options > Projects and Solutions > Locations
    2. Navigate to the User project templates location and User item templates location in File Explorer
    3. Right-click on the folder and click “Properties
    4. Find the “Security” tab and click “Advanced
    5. Check the permission of user in “Permissions” tab

    Sincerely,
    Anna

    0 comments No comments

  4. Atchoum 116 Reputation points
    2020-10-16T13:28:27.597+00:00

    Hi Anna,

    I have full permissions.
    I have already checked as well: %ProgramFiles(x86)%\Microsoft Visual Studio\2019\<edition>\Common7\IDE\ItemTemplates\<Language>\<Locale ID>


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.