PC Review


Reply
Thread Tools Rate Thread

Adding a reference

 
 
Chris Wertman
Guest
Posts: n/a
 
      13th Apr 2004
I am rustier than I thought when it comes to Visual Studio and VB.NET
for the last year I have been writing only ASP.NET pages in inline
code and well I kinda forget how to add a reference , well sort
of.....

I am trying to add System.Net but it dosent show up when I right click
and try to select it from the refrences menu, in fact very few
assemblies I use show up there. I tried adding it to AssemblyInfo.vb
but that dosent seem to work either. I have to call it in this way

Dim objWebClient As New System.Net.WebClient

When I want to call it like this

Dim objWebClient As New WebClient

I had this problem when I first started using Visual Studio and I cant
remeber what I did to get around it. I tried searching on google but I
come up with to many results for my search.

Any help would be greatly appreciated.

Chris
 
Reply With Quote
 
 
 
 
Klaus Löffelmann
Guest
Posts: n/a
 
      13th Apr 2004
Chris,

don't mix up "Importing namespaces" and "adding references". If you open a
new vb project the reference for the functionality of the net-namespace is
already included in the project, since it's hosted in the system assembly.
All you do is adding the reference for the namespace you need at the top of
the source file, like:

imports system.net

that should do it.

Klaus

"Chris Wertman" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> I am rustier than I thought when it comes to Visual Studio and VB.NET
> for the last year I have been writing only ASP.NET pages in inline
> code and well I kinda forget how to add a reference , well sort
> of.....
>
> I am trying to add System.Net but it dosent show up when I right click
> and try to select it from the refrences menu, in fact very few
> assemblies I use show up there. I tried adding it to AssemblyInfo.vb
> but that dosent seem to work either. I have to call it in this way
>
> Dim objWebClient As New System.Net.WebClient
>
> When I want to call it like this
>
> Dim objWebClient As New WebClient
>
> I had this problem when I first started using Visual Studio and I cant
> remeber what I did to get around it. I tried searching on google but I
> come up with to many results for my search.
>
> Any help would be greatly appreciated.
>
> Chris



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      13th Apr 2004
Hi Chris,

In addition to Klaus, when a reference is not build in with the project you
started, you can set it by
Project->Add Reference-> And than a choose between a Net or a Com reference.

Always try to find a Net reference first. Than the rest is as Klaus stated.

Cor


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding dao reference =?Utf-8?B?YmluZHVyYWplZXNo?= Microsoft Access Form Coding 1 9th Mar 2007 01:38 AM
Adding a Reference in VBA Jim May Microsoft Excel Misc 3 26th Jul 2005 12:49 PM
Adding com reference on the fly Mikael Svenson Microsoft Dot NET Framework 1 16th Apr 2004 02:52 PM
Adding a Reference John@hokykoky.com Microsoft Dot NET 2 17th Feb 2004 03:15 AM
Adding a reference under VBA Robin Clay Microsoft Excel Programming 1 14th Oct 2003 06:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:16 AM.