I want add my dll to component list with dlls as shown in image How to do this by C# code
Asked
Active
Viewed 2,486 times
2
-
Go to the "browse" tab and search for your DLL – DerApe Sep 02 '13 at 11:04
-
i know this, but i want to know how to add dll to this list – Islam Ibrahim Sep 02 '13 at 11:06
-
@voo how to do this By c# code – Islam Ibrahim Sep 02 '13 at 11:09
-
TO add using c# code (see http://stackoverflow.com/questions/18569367/c-sharp-how-to-add-dll-to-gac) – Umesh CHILAKA Sep 02 '13 at 11:15
-
@voo - GAC has *nothing* to do with this tab. – Damien_The_Unbeliever Sep 02 '13 at 13:22
3 Answers
3
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"

Hans Passant
- 922,412
- 146
- 1,693
- 2,536
-
Use the RegistryKey class. This is not a great idea, you cannot write to that registry key unless your program runs elevated and you can't make sure that VS is restarted. – Hans Passant Sep 03 '13 at 16:09
-
Wouldn't it work to _always_ ommit the WoW6432Node/ part from the reg key? System folder redirection should kick in automatically and redirect to the WoW version on 64bit? Edit: ok, should read the post first ;) This is about manual edits... nevermind! – Haymo Kutschbach Apr 02 '14 at 18:55
0
Right click on toolbar, select choose Items and add your dll through browse button

Umesh CHILAKA
- 1,466
- 14
- 25
0
It is simple.
- Sign your dll.
- 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.

Harval
- 76
- 3