HighTechTalks DotNet Forums  

RE: Reference GAC assemblies for ASP.NET applications

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss RE: Reference GAC assemblies for ASP.NET applications in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Adam Getchell
 
Posts: n/a

Default RE: Reference GAC assemblies for ASP.NET applications - 10-29-2004 , 12:30 PM






I also looked at another way of doing it, detailed here:

http://aspalliance.com/articleViewer.aspx?aId=76&pId=-1

This involves copying the assembly to a common folder, and then adding a
registry key pointing to that folder so that Visual Studio sees a reference.
Unfortunately, you lose side-by-side versioning, which was a major reason for
using the GAC ....

The problem is, I don't want to do this manually, I want to set up an
installer package to do it.

Unfortunately, the Visual Studio 2003 setup packages don't let you access
the entire registry. You can make a key called HKLM\Software\whatever, but
you can't actually add the key to
\\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramew ork\AssemblyFolders

Any ways around this?

"Adam Getchell" wrote:

Quote:
I'd like to reference the SQLHelper.dll from the Microsoft Application Data
Block. I've created an installer which installs it into the GAC. From reading
articles, I've noted that the GAC enumerates by path; hence, you cannot
reference your own assemblies in VS.NET (lame!) The way to do it for web
applications seems to be to add a line in web config.

Looking at .NET reflector, the information for the assembly is:

SQLHelper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5f160e8905c2c21e

My web.config entry is:

compilation defaultLanguage="c#" debug="true"
<assemblies
<add assembly="SQLHelper, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=5f160e8905c2c21e"/
</assemblies
</compilation

Unfortunately, this doesn't work. I don't want to litter my webserver with
multiple copies of this dll, nor repetitively include the SqlHelper.cs file
in each project. Other ways to get this to work?

I've also tried this by prepending the namespace of the dll, but that
doesn't work either. (Not that it should). From my understanding, this
complete 4-part name should be everything the CLR needs to find the assembly,
and it should be looking in the GAC, and I've verified that the assembly is
indeed in the webserver's GAC.

Also, the "Select a Discussion Group" drop down doesn't work for me on
either IE6 or Firefox. IE6 in particular appears to kill the popups, even
when http://msdn.microsoft.com is in a trusted zone and allowed popups. This
prevents posting first and selecting a discussion group. Instead, one must
navigate directly to the newsgroup so that it is automatically filled in.

Most frustrating.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.