Where's My Assembly!?
page 3 of 4
by J. Ambrose Little
Average Rating: 
Views (Total / Last 10 Days): 26737/ 54

Important Notes

Often developers think that if they create a strongly-named assembly and drop it into the Global Assembly Cache (GAC) that it should show up in the .NET Add Reference dialog list automatically.  Let me tell you that this is simply not the case.  Even Microsoft did not pull off this magic.  This is due to the directory structure of the GAC that puts each assembly into its own unique directory using parts of the strong name.  That is how they enable side-by-side versioning in the GAC (but this may change in future versions). 

In any event, the point here is that you will have to have two copies of your shared assemblies (i.e., assemblies in the GAC) on your development box, one in the GAC and one in a separate location for referencing at compile time.  Microsoft does this and so should you if you want to make your life easier. See C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705 for their compile-time assemblies (notice the XML documentation files included there as well to enhance Intellisense). These are the ones you see in the .NET Add Reference dialog, but the copies the applications that you build use at runtime are actually located elsewhere in the GAC directory structure.

I say all that to point out that the steps you took above will make displaying your shared assemblies in the .NET Add Reference dialog quite simple--just drop them (and their XML documentation files if available) into the Third-Party Tools folder after you put them in the GAC and they will neatly appear in the dialog.  That's just one extra, easy step to make your life easier.  And if you're distributing shared assemblies, you should make your customers' lives easier by automatically putting your assembly into a folder that is under the AssemblyFolders key during your assembly's installation (as you can see aspNetEmail has done in my screen shots).

One last note is that you may need to restart VS.NET after adding new assemblies to the Third-Party Tools location before they will show up in the .NET Add Reference dialog listing.


View Entire Article

User Comments

Title: thumbs up   
Name: Fadi
Date: 2008-05-06 5:38:32 AM
Title: Software Engineer   
Name: D. P.
Date: 2007-04-12 1:46:17 PM
thank you very much. I have been scouring the net trying to figure this one out!
Title: developer   
Name: nobuakiy
Date: 2006-02-12 4:48:47 AM
Yes, It's magic.
My life got easier.
Title: Software Engineer   
Name: D.Ramana
Date: 2006-01-03 2:23:33 AM
This is very nice article. Once read this article every one get the idea..
Title: Great Article   
Name: Daniel
Date: 2005-08-22 5:03:58 AM
Thanks for the article.
Title: developer   
Name: yogi
Date: 2005-05-05 7:13:14 AM
Before reading this article, I was wasting time manually copying dll's between apps and generally tying myself in knots.

Title: IT Consultant   
Name: Prasad Thiriveedi
Date: 2005-01-25 6:30:09 PM
Excellent article. Neat idea.
Title: R.N.   
Name: Merrie
Date: 2004-09-17 9:55:38 AM
Thank you so much for writing such an informative article! I have been trying to figure out some of this stuff for a couple of years - no I am not a computer pro - just a home user. Have a great day!
Title: Technical Systems Analyst   
Name: Claudio Sanchez
Date: 2004-08-19 2:54:49 PM
Excellent article. I'm working on several projects that share some assemblies and have to go to different directories to add them or refresh them. This is a neat idea will save me a lot of work,

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2023 ASPAlliance.com  |  Page Processed at 2023-11-29 11:23:39 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search