C# How to add my dll to .Net Framework Component List

点点圈 提交于 2019-12-11 03:40:18

问题


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


回答1:


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

  • 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

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"



回答2:


Right click on toolbar, select choose Items and add your dll through browse button




回答3:


It is simple.

  1. Sign your dll.
  2. Put your dll inside your framework folder.

Sample:

Copy your dll to this folder

   C:\Windows\Microsoft.NET\Framework\v2.0.50727

Not matter if the Proyect that will Reference Dll is open. Try to add Reference and you will see your dll.

Hope this help.



来源:https://stackoverflow.com/questions/18571650/c-sharp-how-to-add-my-dll-to-net-framework-component-list

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