473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Reference GAC assemblies for ASP.NET applications

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.
Nov 18 '05 #1
1 1310
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:
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.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jan Kidrud | last post by:
Ones I install an assembly in the GAC, I'm unable to unstall it. This diables loading of debug symbols (pdb) of the assembly. This must be a well-known issue, but I didn't succeed in finding a...
4
by: Edward Diener | last post by:
I have a class Y in assembly B which is derived from a class Z in assembly C. So I correctly add a reference to assembly C in assembly B, build assembly B and everything builds fine. Now I create...
5
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
16
by: Kent | last post by:
We have created several Assemblies that we add to the GAC on our web servers. In an ASP.NET app in VS2003, Adding a reference to strong named GAC'd Assembly meant that the web app would use...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
0
by: Raffi Basmajian | last post by:
I am trying to understand the difference between signing ClickOnce manifests and signing shared assemblies. My company is building .Net 2005 WinForm applications for internal company use only....
3
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source...
1
by: Hone | last post by:
I've built a core set of assemblies that are shared by multiple ASP.NET web applications on a production server. These assemblies are updated quite frequently, as I am continually adding to and...
0
balabaster
by: balabaster | last post by:
Hi all, I'm creating a class factory and a bunch of adapters to allow in house applications to communicate with mobile applications over different cellular networks. I've got my class...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.