Bin directory

C

Carlo Razzeto

Hello, my company is just switching from PHP to .Net. As part of this what
we have built our own "AIP", basically just a set of libraries to abstract
common business logic. What we would like is for all of our ASP.Net
applications (we are using visual stuido 2005 with ASP.Net 2.0) to simply
reference our API directory rather than copy referenced libraries to the
local bin directory. So far I'm not seeing how this can be done with Visual
Studio 2005. If any one has an idea that would be great, thanks.
 
K

Karl Seguin [MVP]

Well, one solution is to place the business libraries in the Global Assembly
Cache (GAC), which allows you to reference them without having them placed
in the bin directory. This is where all the native .NET libraries are like
System.Web. You can learn more from
http://msdn2.microsoft.com/en-us/library/yf1d93sz.aspx

One downside of using the GAC is that you might not always have access to
installing into the GAC on certain machines (say you are using a 3rd party
hoster).

My own prefered way of developing is to reference projects, not assemblies.
That is, in your Dummy1 website project, the solution would contain the
complete projects for all libraries.

Karl
 
C

Carlo Razzeto

We actually did consider this approach, however we found that when we added
librareis to the GAC we could not add them to our visual studio references,
perhaps we were doing this incorrectly.

There is one downside to using the GAC however, (apart from 3rd party
machines which is not an issue for us), the GAC will maintain all versions
of a library which has been added to it (we never did figuer out how to
remove libraries from the GAC). We would actually like for all of our
websystems to be on the same page w/o a recompile.

Hmmm, we do however strickly enforce version numbers on our dlls however,
currently all dlls must be revision 1.0.0.0. So what would happen if we
tried to add an updated library with the same name/version as a library
which currently exists in the GAC, would the update be allowed? If so would
it mearly overwrite the older library?

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:[email protected]...
 
R

Raymond

When you add an assembly into GAC, you need to keep
another copy elsewhere for compile-time referencing.
The same thing is done with Microsoft assemblies, which
are in GAC, but also in the WINNT\Microsoft.NET folder.


Carlo Razzeto said:
We actually did consider this approach, however we found that when we added
librareis to the GAC we could not add them to our visual studio references,
perhaps we were doing this incorrectly.

There is one downside to using the GAC however, (apart from 3rd party
machines which is not an issue for us), the GAC will maintain all versions
of a library which has been added to it (we never did figuer out how to
remove libraries from the GAC). We would actually like for all of our
websystems to be on the same page w/o a recompile.

Hmmm, we do however strickly enforce version numbers on our dlls however,
currently all dlls must be revision 1.0.0.0. So what would happen if we
tried to add an updated library with the same name/version as a library
which currently exists in the GAC, would the update be allowed? If so would
it mearly overwrite the older library?

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:[email protected]...
 
K

Karl Seguin [MVP]

I believe different versions are kept in the GAC, so you're code would
always reference the same version (no automatic update, which is both good
and bad).

Karl

--
http://www.openmymind.net/



Carlo Razzeto said:
We actually did consider this approach, however we found that when we
added librareis to the GAC we could not add them to our visual studio
references, perhaps we were doing this incorrectly.

There is one downside to using the GAC however, (apart from 3rd party
machines which is not an issue for us), the GAC will maintain all versions
of a library which has been added to it (we never did figuer out how to
remove libraries from the GAC). We would actually like for all of our
websystems to be on the same page w/o a recompile.

Hmmm, we do however strickly enforce version numbers on our dlls however,
currently all dlls must be revision 1.0.0.0. So what would happen if we
tried to add an updated library with the same name/version as a library
which currently exists in the GAC, would the update be allowed? If so
would it mearly overwrite the older library?

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top