Where are ASP.NET 2.0 References Stored?

C

cmay

If you add a reference to an ASP.NET 2.0 Web Project, where does it
save that reference?

I don't mean the DLL, I mean the reference to the DLL.


In 2003 I believe it would put 1 line per assembly in the vbproj file,
but there is no project file anymore in 2005.
 
J

Juan T. Llibre

This is a bit more complicated than that, DWS.

They are stored...nowhere, AFAIK.

Without a project file for web projects in ASP.NET 2.0, there is no way to register
referenced assemblies other than adding the assemblies to the web project's Bin folder
- which is what a web project's "Add Reference" applet does.

This has been criticicized very much.

When you have a solution with a web project and a couple of class libraries,
new versions of those class library assemblies are copied to the web project's
Bin folder each time they are built.

With multiple people on the team building the solution, they will constantly get check-in
conflicts in the web project's Bin folder because they are constantly creating new versions
of the assemblies in the Bin folder with each build in their own dev environments.

The work around is to not put the web project's Bin folder under source control and to add
a post build event to every project "referenced" by the web project to "push" the complied
class libraries to the web project's Bin folder.

This allows the web project to have the right assembly references and to keep the
source control mechanism from having to play a part in the web project references.

This was supposed to be fixed by RTM by having the references stored in the solution file.
Apparently, it didn't make it to RTM.
 
E

Erik Funkenbusch

This is a bit more complicated than that, DWS.

They are stored...nowhere, AFAIK.

Why then, when i add a reference to something, such as DirectoryServices,
is an <assemblies> section added to web.config with references to that
assembly?
 
C

cmay

I believe these are only for the case of DLLs that are registered in
the GAC.

Just try adding a reference to a project in your solution, or a
reference to the output DLL of another .net project you are working on.

It won't show up in your web.config.
 

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,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top