C#中如何把我的DLL添加到.NET框架组件列表我的、组件、框架、列表

2023-09-05 03:47:33 作者:花落相依

我要加我的DLL组件列表的dll如图形象 如何通过做到这一点的 C#code

I want add my dll to component list with dlls as shown in image How to do this by C# code

推荐答案

.NET选项卡上的内容是由注册表中的设置来决定。您可以轻松地改变他们:

The content of the .NET tab is determined by registry settings. You can easily change them:

启动Regedit.exe 定位到HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft.NETFramework \ AssemblyFolders密钥(32位机上放置Wow6432Node) 右键单击AssemblyFolders键,新歌+键 键入一个与众不同的名字,喜欢的产品或您自己的名字。实际的字符串不要紧 双击右侧窗格中的(默认)值,然后键入名字到的目录的包含您的组件 在重新启动Visual Studio Start Regedit.exe Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\AssemblyFolders key (drop Wow6432Node on a 32-bit machine) Right-click the AssemblyFolders key, New + Key Type a distinctive name, like the product or your own name. The actual string doesn't matter Double-click the (Default) value in the right pane and type name to the directory that contains your assemblies Restart Visual Studio

一个示例.reg文件,将添加的文件夹,编辑就为自己使用:

A sample .reg file that will add the folder, edit it for your own use:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\AssemblyFolders\Hans Passant]
@="C:\\Users\\hpass_000\\Projects\\ClassLibrary1\\bin\\Release"