473,503 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't reference Assemblies in GAC?

I've just created a simple class library, gave it a strong name using
sn.exe, then copied it to c:\winnt\assembly directory. I then created an
ASP client that reference that assembly. The client works only works if I
have the assembly under the ASP client's \bin directory, even though it's
also in GAC. Does anyone know what the problem is?

I got the following error:

File or assembly name <xxxx>, or one of its dependencies, was not found.

The assembly load trace does not seem to include the directory
"c:\winnt\assembly". Does it not always look for the assembly in GAC?

Thanks in advance.
Nick
Jul 19 '05 #1
3 5827
SR
Hi

Try this out

a) Use th GACUtil utility to register in the GAC

b) more important(and believe me, many have had this
problem), is the way u are referrring to the GAC Assembly
in ur aspx. If u are just giving the assembly name, then
u need to have a copy of that assembly in ur bin dir. If
u want to access the GAC based assembly, then u need to
give the full identity(Name+Version+Culture+Public Key).

For example, while using Microsoft IE Web Controls,
If u refer it in ur aspx as
<%@ register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls" Assembly
="Microsoft.Web.UI.WebControls" %>
and it forced me to have a local copy

U change it to
<%@ Register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

and it will pick up perfectly from the GAC.

The reason is that to use any GAC based assembly u need to
provide the full identity

hope this helps

regards,

sr
-----Original Message-----
I've just created a simple class library, gave it a strong name usingsn.exe, then copied it to c:\winnt\assembly directory. I then created anASP client that reference that assembly. The client works only works if Ihave the assembly under the ASP client's \bin directory, even though it'salso in GAC. Does anyone know what the problem is?

I got the following error:

File or assembly name <xxxx>, or one of its dependencies, was not found.
The assembly load trace does not seem to include the directory"c:\winnt\assembly". Does it not always look for the assembly in GAC?
Thanks in advance.
Nick
.

Jul 19 '05 #2
Fixed. Thanks.

It looks like I had to copy the dll within the production server to GAC.
What I did before was coping the dll across the network.

Thank for the response.
Nick

"SR" <rs*****@yahoo.com> wrote in message
news:04****************************@phx.gbl...
Hi

Try this out

a) Use th GACUtil utility to register in the GAC

b) more important(and believe me, many have had this
problem), is the way u are referrring to the GAC Assembly
in ur aspx. If u are just giving the assembly name, then
u need to have a copy of that assembly in ur bin dir. If
u want to access the GAC based assembly, then u need to
give the full identity(Name+Version+Culture+Public Key).

For example, while using Microsoft IE Web Controls,
If u refer it in ur aspx as
<%@ register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls" Assembly
="Microsoft.Web.UI.WebControls" %>
and it forced me to have a local copy

U change it to
<%@ Register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

and it will pick up perfectly from the GAC.

The reason is that to use any GAC based assembly u need to
provide the full identity

hope this helps

regards,

sr
-----Original Message-----
I've just created a simple class library, gave it a

strong name using
sn.exe, then copied it to c:\winnt\assembly directory. I

then created an
ASP client that reference that assembly. The client

works only works if I
have the assembly under the ASP client's \bin directory,

even though it's
also in GAC. Does anyone know what the problem is?

I got the following error:

File or assembly name <xxxx>, or one of its dependencies,

was not found.

The assembly load trace does not seem to include the

directory
"c:\winnt\assembly". Does it not always look for the

assembly in GAC?

Thanks in advance.
Nick
.

Jul 19 '05 #3
Not sure if you got a response elsewhere. Anyways, an attempt will be made
to look in the GAC, only if you reference the assembly by the full name -
like so "MyCo.MyAssembly, Version=1.0.1175.28478,
Culture=neutral,PublicKeyToken=5378d68701e60agd"
If you have partial references and don't (cannot) want to change, you can
use qualifyAssembly element in Web.Config to redirect partial-name assembly
requests to full-name requests which then get redirected to GAC.

"Nick" <ni****@hotmail.com> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
I've just created a simple class library, gave it a strong name using
sn.exe, then copied it to c:\winnt\assembly directory. I then created an
ASP client that reference that assembly. The client works only works if I
have the assembly under the ASP client's \bin directory, even though it's
also in GAC. Does anyone know what the problem is?

I got the following error:

File or assembly name <xxxx>, or one of its dependencies, was not found.

The assembly load trace does not seem to include the directory
"c:\winnt\assembly". Does it not always look for the assembly in GAC?

Thanks in advance.
Nick

Jul 19 '05 #4

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

Similar topics

8
2376
by: Dave | last post by:
This may be a simple question, but I'm new to .NET and not having much luck finding out the answer. I'm writing a Windows Service and want to develop a separate program that provides a user...
4
6121
by: WM Chung | last post by:
Hi all, I meet a problem in building my .Net Solution and I would like to seek help. After I have added a dll to reference in one of my project in my solution, when I re-build the solution, I...
3
1463
by: Vadym Stetsyak | last post by:
Hi there I am building an assembly Asm1, and it has references to Asm2 and Asm3. (/reference: Asm2.dll Asm3.dll) In Asm1 I am using types only from Asm2. The question is will CLR loader load...
3
1365
by: bill joyce | last post by:
I have installed an assembly in the GAC ( a DAL), now I want to make a reference to it in my Business Obj. This is one way I found out how to do it is there another way? <system.web>...
1
1324
by: Adam Getchell | last post by:
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...
16
2066
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...
7
13785
by: Oldman | last post by:
How do you conditionally reference an assembly based off of the build configuration? Imagine a scenario where I want to have an Sql Release Server build and an Oracle Release Build and the only...
11
2711
by: Mark Olbert | last post by:
I'm running into some oddball behavior that I hope is not by design. When I add a reference (via Add Reference) to the bin folder, some, but not all, of the assemblies referenced by the assembly...
27
1807
by: HKSHK | last post by:
Hello, I have this problem: I wrote some DLLs with VB.Net 2003 which I use with my programs. But I want to avoid that I have to go down to "DLL hell" and to copy all used dlls into each program...
14
2642
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
0
7287
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,...
1
7008
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
7467
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
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
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...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.