references do what?

  • Thread starter Thread starter Rick Csucsai
  • Start date Start date
R

Rick Csucsai

Sad to say, i have developed several B2B web apps using ASP fo rnearly 5
years now and there is on area that i still don't have a grasp on. Why do
you make references? Better yet, what happens if you don't. Here is an
example. For some reason, I couldn't get my latest creation to send email.
Would return something about a SendUsing config being bad. I go to MS site
and use one of their demo codes. It says to create a new project and add a
reference to system.web.dll. Before I added it, I tried my project again and
magically, it has started working. I am pretty sure that the settings that I
made Friday just needed some time to take effect (properly set SMTP config
on IIS serv). But reading the MS code makes me wonder enough to ask: Why do
you manually add references to projects, and what happens if you don't? Mine
worked fine without adding the reference to the project. Are references what
will allow VS.Net to auto complete things for you? For example, when i use
the wizard to start a new web proj, I notice that VS.Net will auto suggest
properties for objects that I have inserted as I am coding. The proj I am
doing now I just linked to a web site (no wizard) and it auto suggests
nothing which makes me have to dig for properties as opposed to it auto
generating a pop up. how do i get VS.Net to auto pop up property suggestions
for objects? Thanks all!
 
References tell the compiler where to find the DLLs it needs to compile your
project.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Hi,

The reference task is to add to assembly metadata all the assemblies
that used by the given assembly and indication whether the assembly got
strong name key. VS use that data to load reference assemblies’ metadata
to show inlellisense and CLR loader use it to load those assemblies. By
default when you open VS project certain references are made by the VS.
You can see those references by using ildasm tool and look in the
metadata.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
How is it then that even though I didn't specifically add the reference
that it still works? Also, any answer on how to tell VS to give me the
pop ups as I am entering objects?

Thanks for the reply.
 
It shouldn't. In fact it can't. If the reference isn't there, the runtime is
hopelessly lost. The fact that it is working implies that there is a
reference telling it where to find the assembly

regards
 
Back
Top