You can get your assembly to show up in the references dialog by adding a registry entry (this is what SQL Server does in VS 2005):
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\ADOMD.C lient] @="c:\\Program Files\\Microsoft.NET\\ADOMD.NET\\90\\" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\SQL Server Assemblies] @="c:\\Program Files\\Microsoft SQL Server\\90\\SDK\\Assemblies\\" This all works fine assuming you are building or copying your assembly into the folder that you are referencing. If your reference is to a location OTHER than the registry location and you have changed an interface on the shared assembly, you won't see it in dependent assemblies. What we've done with shared .DLLs is to add a post build step that copies the built DLL (Debug or Release) to a "Lib" folder relative to the project (e.g. call copy $(TargetPath) ..\..\..\Common\Lib). This has a couple of advantages: 1. (In VS 2005) you get the new "Recent" tab on the references dialog box so once you reference this location once, it continues to stay in the references dialog box without a "Browse." 2. It works for command line (nant in our case) builds for debug and release. This means that we can start from VSS on a blank disk (assuming msbuild and nant) and build the entire application without worrying that a reference is to a debug version of a shared assembly. Ryan -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Vince P Sent: Thursday, December 01, 2005 7:07 AM To: [email protected] Subject: Re: [ADVANCED-DOTNET] Gacutil problems Having an assembly be in the GAC doesn't mean it will show up in the .Net References dialog.. In fact there is no link between them. The dialog is working off a list of file system paths. This was my first major "mistake" when working in .Net. I wanted the convenience of being able to reference some utility assemblies from any project I wanted.. So I went the GAC route... Well the GAC was really a big waste of time. (and the GAC introduces more problems than it solved , at least for my needs) I'm content to let MS have the GAC and major UI component authors. By claiming God As his holy right | He's stealing a God From the Israelites Stealing a God From the Muslim too | There is only one God Through and through - "John the Revelator" - Depeche Mode -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Ragnvald Barth Sent: Thursday, December 01, 2005 4:50 AM To: [email protected] Subject: [ADVANCED-DOTNET] Gacutil problems I have a .net 2.0 dll that will be used from several different applications. So I figured I should put the dll in the gac. I am using Visual Studio 2005 Team Suite release candidate for this project. First I typed gacutil /i MyDll.dll in the .net 2005 command prompt. It worked ok. Then I added the gacing as a post build step. Because I didnt have the directory of gacutil in my path I added the post build step like this: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe /i MyDll.dll It worked fine too. Then I added C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin to my path, and changed the post build step to: gacutil /i MyDll.dll When I tried to build I got the error code 9009. I have tried to google for gacutil 9009 and found others with the same problem, but no one has a solution. Is this a gacutil bug or am I doing something wrong? Then I went back to using gacutil /i MyDll.dll from the 2005 command prompt, and manually gaced my dll successfully, because I wanted to use it from another solution. In the other solution, I went to "add reference..." on a project, and tried to find my MyDll in the .NET tab. But it is not there! Why? Where can I find it? What am I doing wrong? =================================== This list is hosted by DevelopMentorR http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
