Access Visual Studio 2017#39;s private registry hive(访问 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:
- 启动 RegEdit.exe
- 在左侧窗格中选择 ComputerHKEY_LOCAL_MACHINE 节点
- 选择文件 |加载 Hive... 菜单项,并加载 privateregistry.bin
- 当提示输入键名时,只需输入类似VSRegHive"的内容
- 这会将数据加载到 HKLM 节点下的 VSRegHive 中
- 完成探索后,请务必选择 VSRegHive 并选择文件 |在退出 RegEdit.exe 实用程序之前卸载 Hive...,否则VS 将无法启动.保持在 regedit 中加载配置单元会创建一些一种阻止 DevEnv.exe 启动的锁.
以编程方式访问密钥 RegLoadAppKey 确实是您最好的选择.
To programmatically access the key RegLoadAppKey is indeed your best bet.
这篇关于访问 Visual Studio 2017 的私有注册表配置单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:访问 Visual Studio 2017 的私有注册表配置单元
- 在 LINQ to SQL 中使用 contains() 2022-01-01
- CanBeNull和ReSharper-将其用于异步任务? 2022-01-01
- Azure Active Directory 与 MVC,客户端和资源标识同一 2022-01-01
- 是否可以在 .Net 3.5 中进行通用控件? 2022-01-01
- 带问号的 nvarchar 列结果 2022-01-01
- 使用 rss + c# 2022-01-01
- 为什么 C# 中的堆栈大小正好是 1 MB? 2022-01-01
- Windows 喜欢在 LINUX 中使用 MONO 进行服务开发? 2022-01-01
- C# 通过连接字符串检索正确的 DbConnection 对象 2022-01-01
- 在 C# 中异步处理项目队列 2022-01-01
