user310291
user310291

Reputation: 38180

Where are components (dll) references stored in ASP.NET?

I have dlls in bin directory. I can't see where they are referenced in either solution or web.config files. So where are the references stored ?

Upvotes: 10

Views: 7011

Answers (5)

Joseph Ramos
Joseph Ramos

Reputation: 51

When working on a previously developed ASP.NET "WebSite" project in VS2012, I figured out how to find them (and thus add/remove/update them).

  1. Over in the Solution Explorer, right-click the name of the project (the project will have the wire-frame globe icon next to it)
  2. Click "Property Pages" (NOT Properties Window). It will appear in its own separate (floating) window frame.
  3. Now just left-click the item "References" at the top of the list to the left. That's it! You can now add, delete, and update any reference(s) associated with your WebSite project.

Upvotes: 5

Alan Jackson
Alan Jackson

Reputation: 6511

In the case of an ASP.NET web site, the references are stored in the web.config file.

I've removed most of the assemly references, but one of my old web sites has things like this:

<compilation debug="true">
  <assemblies>
    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
  </assemblies>
</compilation>

Upvotes: 2

Brian Mains
Brian Mains

Reputation: 50728

If web app project or MVC, right-click and select unload project. Then right click again and select edit . If you dig through the XML, you will find the collection of project references and other DLL references to MS or other assemblies.

Upvotes: 4

Geoff
Geoff

Reputation: 4746

The answer depends on if your project is a Web Site or a Web Application. In a Web Site all the assemblies in the bin directory are automatically referenced. A Web Application has the project references that you are looking for.

Upvotes: 7

R. Martinho Fernandes
R. Martinho Fernandes

Reputation: 234394

If you actually have them referenced, they should be "stored" in the project files (*.csproj for C#, *.vbproj for Visual Basic).

Upvotes: 3

Related Questions