本文介绍了访问 Visual Studio 2017 的私有注册表配置单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 使用私有注册表配置单元而不是污染"系统注册表 - 通常可以在这样的地方找到:

Visual Studio uses a private registry hive instead of "polluting" the system registry - typically found somewhere like this:

C:UsersAbxAppDataLocalMicrosoftVisualStudio15.0_4b0ba1c0privateregistry.bin

[为了确定已安装的扩展,我们需要查看以下键:SoftwareMicrosoftVisualStudio15.0_4b0ba1c0ExtensionManagerEnabledExtensions]

[In order to determine installed extensions we need to look at the following key:SoftwareMicrosoftVisualStudio15.0_4b0ba1c0ExtensionManagerEnabledExtensions]

在 C# 中按键加载和访问此文件的最简单方法是什么?

What is the simplest way to load and access this file by key in C#?

推荐答案

要手动查看,您可以使用 regedit.exe 应用程序通过执行以下操作来加载 privateregistry.bin 文件:

To manually review, you can use the regedit.exe application to load the privateregistry.bin file by doing the following:

  1. 启动 RegEdit.exe
  2. 在左侧窗格中选择 ComputerHKEY_LOCAL_MACHINE 节点
  3. 选择文件 |加载 Hive... 菜单项,并加载 privateregistry.bin
  4. 当提示输入键名时,只需输入类似VSRegHive"的内容
  5. 这会将数据加载到 HKLM 节点下的 VSRegHive 中
  6. 完成探索后,请务必选择 VSRegHive 并选择文件 |在退出 RegEdit.exe 实用程序之前卸载 Hive...,否则VS 将无法启动.保持在 regedit 中加载配置单元会创建一些一种阻止 DevEnv.exe 启动的锁.

以编程方式访问密钥 RegLoadAppKey 确实是您最好的选择.

To programmatically access the key RegLoadAppKey is indeed your best bet.

这篇关于访问 Visual Studio 2017 的私有注册表配置单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 09:44