Cant create TFS Work Items, Denied Access to registry key that doesn't exist

折月煮酒 提交于 2019-11-28 11:33:45

问题


I created a GIT repository on GitHub, then created a TFS Project with Git scm and Agile process template, then I chose Import Repository and specified the GitHub URL.

After the TFS Project was created I see an error message in Team Explorer:

Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0_8708a912\WorkItemTracking\TeamMenu\AddWorkItemMru\TFSServer01\XYZProjectCollection\64c06df7-220f-433c-b7d6-6a59426340e1' is denied.

I get a msgbox with the same error when I try to create work items.

The symptom of the problem is not the root cause; the registry key doesn't even exist so i cant give permission to it:

I saw this related QA but clearing TFS and VS cache dont help.

I ran a ProcessMonitor trace while reproducing the problem and I see the ACCESS DENIED but it points to another REGISTRY A??

So its misleading that it was Denied Access to the Registry Key HKEY_Current_User. But what is this REGISTRY\A and where is it located? When I use ProcessMonitor JumpTo it cant find the location in the registry and ends up at Computer\HKEY_CLASSES_ROOT\Software\Microsoft\Windows

Does anyone know how I can give myself permission to this REGISTRY\A?

Note: I am the TFS Admin and an admin of this PC. I've read up on REGISTRY\A and Application Hives I just dont know how to give myself access. Also, the GitHub repository was empty when imported to TFS, if that makes a difference. This is an on-premise install of TFS2017 on an Azure server in a VPC.


回答1:


To edit a Application Hive. Ref: Access Visual Studio 2017's private registry hive

This key appears to be stored in VS application hive file:

C:\Users\<user name>\AppData\Local\Microsoft\VisualStudio\15.0_05fc10d7\privateregistry.bin

Start regedit as admin, load the hive file (privateregistry.user.bin) into regedit :

  1. Launch RegEdit.exe
  2. Select the Computer\HKEY_LOCAL_MACHINE node in the left-hand pane
  3. Select the File | Load Hive... menu item, and load the privateregistry.user.bin
  4. When prompted for a key name, just type in something like "VSRegHive"
  5. This will load the data into a VSRegHive under the HKLM node
  6. To fix the problem either create the missing keys or edit existing ones

  7. When finished select the VSRegHive and select File | Unload Hive... , before exiting the RegEdit.exe utility, otherwise VS will fail to start. Keeping the hive loaded in regedit creates some sort of lock that prevents DevEnv.exe from launching.



来源:https://stackoverflow.com/questions/44150162/cant-create-tfs-work-items-denied-access-to-registry-key-that-doesnt-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!