473,406 Members | 2,217 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,406 software developers and data experts.

2.0 and/not GAC Assemblies


I have a new ASP.NET 2.0 project. I have a 3rd party DLL installed in
the GAC. I also have a copy of the DLL in a seperate "lib" directory.
In the web project, I added a reference to the "lib\3rdparty.dll", but
Visual Studio 2005 added a reference to the GAC'd one instead.

I do *NOT* want to use the GAC'd assembly, I want to use the one in
the lib directory. How can I make this happen?

Thanks.

Jan 19 '06 #1
4 1278
I have a similar situation, except I don't understand what the
difference is between the GAC version and the lib folder version?

Can you just hack the webconfig file to point to the lib folder?

Jan 19 '06 #2
xenophon,

..NET first looks for an assembly in the GAC and then in the bin folder etc.

There are two things you can do to get a reference to the proper assembly:

1) Replace the assembly in GAC with the new one (but it sounds like you need
to keep that there).
2) If the assembly's version number in the "lib" directory is higher than
the one in GAC then .NET will look for the newer version number elswhere
after it doesn't find it in the GAC.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"xenophon" <xe******@online.nospam> wrote in message
news:je********************************@4ax.com...

I have a new ASP.NET 2.0 project. I have a 3rd party DLL installed in
the GAC. I also have a copy of the DLL in a seperate "lib" directory.
In the web project, I added a reference to the "lib\3rdparty.dll", but
Visual Studio 2005 added a reference to the GAC'd one instead.

I do *NOT* want to use the GAC'd assembly, I want to use the one in
the lib directory. How can I make this happen?

Thanks.

Jan 19 '06 #3

Well, right now I think I have the problem solved by moving things
from my "lib" directly to the site's \bin directory. I don't add a
Reference at all. Visual Studio gives me IntelliSense and it compiles.

^shrug^ this didn't have to be different too compared to VS 2003.

On Thu, 19 Jan 2006 09:57:33 -0600, "S. Justin Gengo [MCP]"
<justin@[no_spam_please]aboutfortunate.com> wrote:
xenophon,

.NET first looks for an assembly in the GAC and then in the bin folder etc.

There are two things you can do to get a reference to the proper assembly:

1) Replace the assembly in GAC with the new one (but it sounds like you need
to keep that there).
2) If the assembly's version number in the "lib" directory is higher than
the one in GAC then .NET will look for the newer version number elswhere
after it doesn't find it in the GAC.


Jan 19 '06 #4
Hi xenophon,

As for the application's assembly reference, the reference we added in IDE
is not quite the same as the reference that the application will locate at
runtime.... When we add the reference for our project in VS IDE, it just
pointed to a certain file on disk so that the IDE can find it and use it to
compile the project..... For strong-named assembly, IDE will record its
path on disk , however, the strong-named assembly is always marked as copy
local = false . And at runtime, .net clr runtime always search GAC first
for strong-named assembly, no matter how to reference the assembly in
IDE... Here is the msdn reference mentioned the .NET runtime assembly
locating rule:

#How the Runtime Locates Assemblies
http://msdn.microsoft.com/library/en...untimelocatesa
ssemblies.asp?frame=true

Also, for manually force the runtime use a specific path instead of GAC for
our strong-named assembly, so far what we can get is using the <codebase>
setting:

#<codeBase> Element
http://msdn.microsoft.com/library/en...eBase.asp?fram
e=true

In addition, for ASP.NET web application, we should always put strong-named
assembly in GAC (rather than private bin path) since ASP.NET does not
support strong-named assembly in private bin...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| NNTP-Posting-Date: Thu, 19 Jan 2006 11:56:11 -0600
| From: xenophon <xe******@online.nospam>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: 2.0 and/not GAC Assemblies
| Date: Thu, 19 Jan 2006 12:50:55 -0500
| Message-ID: <s8********************************@4ax.com>
| References: <je********************************@4ax.com>
<Om**************@TK2MSFTNGP12.phx.gbl>
| X-Newsreader: Forte Agent 2.0/32.646
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 24
| X-Trace:
sv3-TK7zOwzH3ozkVV5G87n+XqvGHUO0GdpNxjTGvniVTYKaw2pGOF ozZQeQX6PY2/fu7AAbSaW+
5DFHTuc!VvWWMAPcRXp6JWv5ZtlZk6DB/7xmQEfiSicUq4gVwMS6U4w+MXJzwEORNV/f0CYyJJpg
Mg==
| X-Complaints-To: ab***@giganews.com
| X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!news.giganew s.com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:372158
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| Well, right now I think I have the problem solved by moving things
| from my "lib" directly to the site's \bin directory. I don't add a
| Reference at all. Visual Studio gives me IntelliSense and it compiles.
|
| ^shrug^ this didn't have to be different too compared to VS 2003.
|
|
|
| On Thu, 19 Jan 2006 09:57:33 -0600, "S. Justin Gengo [MCP]"
| <justin@[no_spam_please]aboutfortunate.com> wrote:
|
| >xenophon,
| >
| >.NET first looks for an assembly in the GAC and then in the bin folder
etc.
| >
| >There are two things you can do to get a reference to the proper
assembly:
| >
| >1) Replace the assembly in GAC with the new one (but it sounds like you
need
| >to keep that there).
| >2) If the assembly's version number in the "lib" directory is higher
than
| >the one in GAC then .NET will look for the newer version number elswhere
| >after it doesn't find it in the GAC.
|
|

Jan 20 '06 #5

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

Similar topics

6
by: Tom Dacon | last post by:
If you're not putting assemblies in the GAC, but are referencing shared code with copylocal=true into the projects that use them, is there any value to signing the assemblies? In the environment...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
3
by: Joel Leong | last post by:
I wish to know the industrial practices for signing assemblies with key files. I genereted a key file to sign my assemblies. Should I sign all my assemblies with a single key files or I shall...
1
by: Afaq | last post by:
Hi, After adding large number of empty resource files (which will be updated later), we are not able to compile the project. the following is the output of the build process. It fails while...
6
by: Sam-I-Am | last post by:
Hi There I have several websites that use shared assemblies in the GAC. When I try and update the GAC assemblies I get the following error: "The process cannot access the file because it is...
8
by: Jason | last post by:
In my ASP.NET 1.1 solutions, I created several web projects and compiled them each into an assembly. The assembly names reflected the functionality of the feature (Membership.dll, Dues.dll, etc)....
8
by: Charles Law | last post by:
I'm sorry to keep harping on about this one, but it is really quite important for me to be able to list _all_ required assemblies in my Help About box. Herfried kindly posted some code before that...
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...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
4
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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,...

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.