Adding references: the details

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The two obvious methods for ref'ing assemblies are:

Add a reference and 'Browse' for the actual DLL

OR

Add existing project to the solution, then add a ref to 'Project'.

1: I'd like to find out what the latter method is doing.
I'm assuming that it makes sure that debug exe gets matched to
debug DLL, etc. What else is going on? (I couldn't locate much
info in MSDN)

2: This method induces a couple glitches: If assembly A refs
assembly B, then the project for assembly A works as expected:
Just add assembly B to A's solution, then set a reference to B.

Now what about the final exe that uses assembly A: Add A to
the exe's solution, then set a reference to A. You'd expect that
B would be automatically ref'd by A's project. No such luck. The
build generates an error as if A can no longer find assebly B.

I hope that was understandable. Any way to simplify that, or must
the top solution go through the add-to-project and add-ref-to-project
for every sub-sub-sub-assembly that's referenced?

.



Relevant Pages

  • Re: Probably an easy question re: Namespaces
    ... Why not just create an assembly (dll) with the shared code, ... make as many EXE files reference that assembly? ... > attempting to do is create a "core program" that will also have several ... >> I've never tried using the same namespace in multiple assemblies. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Namespace Question
    ... >i saw that when i changed it to true my dll was copied to the bin folder ... >and only after i set the copylocal property to false and than to true ... >For the Reference Path Issue, ... Look for assemblies in directories specified with the Reference Path ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Namespace Question
    ... >>i saw that when i changed it to true my dll was copied to the bin folder ... >>the reference by looking in the following locations, ... Look for assemblies in directories specified with the Reference Path ... >> tried to use the GAC but the process to convert dll to be strong name ...
    (microsoft.public.dotnet.languages.vb)
  • Error: The dependency in cannot be copied...(references in vs.net2
    ... Within my group of developers we have a list of library components we develop ... solutions/projects reference these "released" .dll's. ... These assemblies are ... application has the most recent .dll. ...
    (microsoft.public.dotnet.general)
  • Re: Assemblies in GAC
    ... The list of assemblies you see in the "Add Reference" dialog is populated ... > I have an assembly in GAC which I want to reference in my project. ... > could not find the dll in the list. ...
    (microsoft.public.dotnet.framework)