473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Adding a reference

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
Nov 20 '05 #1
2 1394
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" <cw******@yahoo.com> schrieb im Newsbeitrag
news:14**************************@posting.google.c om...
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

Nov 20 '05 #2
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
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John | last post by:
What si the difference between Adding a Reference and actually dragging and dropping an activeX control onto a form? Thanks John ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure...
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
0
by: Saumendra | last post by:
Hi guys, When I am adding a Web Reference in Visual Studio.net, I provide the url to the .vsdisco file, so that Visual Studio.net can dynamically discover all the available Web Services. Now when...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three...
1
by: rgarf | last post by:
I have a web service that is consumed by a C++ application. I added a C# dll reference to the web service, When the web service calls a method on the dll, it sends back an HRESULT of E_FAIL to my...
3
by: _DS | last post by:
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...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.