473,320 Members | 1,883 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,320 software developers and data experts.

VS 2002 can't see my Namespace

I have a DLL in the bin folder of my Web Application.

When I try to build it, it says it can't find it.

Here is the beginning of my Class:

************************************************** *****
Imports System
Imports System.Data
Imports System.Data.SqlClient

Namespace MyFunctions

' DbObject is the class from which all classes in the Data Services Tier
' inherit. The core functionality of establishing a connection with the
' database and executing simple stored procedures is also provided by
' this base class.
' ---
Public Class DbObject

************************************************** *********

This works fine in my other asp.net pages where I don't use use VS to create
it and use:

<%@ Import Namespace="MyFunctions" %>

in my .aspx page.

In my VS Project I just added it to my using section:
using System;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using integration.RemoteUser;
using integration.PayStatement;
using integration.ReportTable;
using integration.Employee;
using integration.CheckHistory;
using MyFunctions;

Looks the same as the others. What else do I need to do for it to recognize
it?

The error I get is:

The type or namespace name 'MyFunctions' could not be found (are you missing
a using directive or an assembly reference?)

Thanks,

Tom
Nov 17 '05 #1
2 1658
tshad wrote:
I have a DLL in the bin folder of my Web Application.

<snip>

In order to use classes in a dll you need to add a reference to the dll
itself. Specifying "using Namespace;" is only a shorthand way for the
compiler to find your classes in that dll (ie. you don't have to specify
Namespace.Class).

If you look in the solution window and expand the project you'll have a
"folder" named References. Right-click References and choose Add
Reference, then click Browse and select your dll, then it should work
better.

--
Lasse Vågsæther Karlsen
http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2
Nov 17 '05 #2
That did it.

Why don't I have to do that in my .aspx pages?

All I do is:
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="MyFunctions" %>

In VS, I can just do this (same as aspx page):
using System.Data;
using System.Data.SqlClient;

why can't I just add the reference:

using MyFunctions;

Isn't that what "Using" is for?

Thanks,

Tom
"Lasse Vågsæther Karlsen" <la***@vkarlsen.no> wrote in message
news:OQ**************@TK2MSFTNGP15.phx.gbl...
tshad wrote:
I have a DLL in the bin folder of my Web Application.

<snip>

In order to use classes in a dll you need to add a reference to the dll
itself. Specifying "using Namespace;" is only a shorthand way for the
compiler to find your classes in that dll (ie. you don't have to specify
Namespace.Class).

If you look in the solution window and expand the project you'll have a
"folder" named References. Right-click References and choose Add
Reference, then click Browse and select your dll, then it should work
better.

--
Lasse Vågsæther Karlsen
http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2

Nov 17 '05 #3

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

Similar topics

1
by: James Bell | last post by:
After installing VS .NET 2002, I insert the MSDN Library April 2002 CD 1. After answering all of the questions, but just before installation begins, I get the following message box: Title:...
2
by: Pawan Aggarwal | last post by:
I'm having trouble with calling an exported function in a native DLL compiled with eMbedded Visual C++ in C# application in PocketPC 2002 OS. Problem Description follows: I have one exported...
0
by: Scott Chang | last post by:
Hi all, I tried to use Managed C++ coding of VC++.NET (2002)and OpenGL version 1.2 to draw a hexagon shape of benzene. My OpenGLdrawBenzene.cpp is the following: // This is the main project file...
1
by: Scott Chang | last post by:
Hi all, I loaded the following program 'HelloMCPP' to my MS VC++ .NET (2002) that is installed on my Windows XP Professional PC: ------------------------------------- AssemblyInfo.cpp...
0
by: Scott Chang | last post by:
Hi all, I have Microsoft Visual C++ .NET (2002) program that is installed on my Windows XP Professional Operating System PC. I started my project (named HelloMCPP)in the Managed C++ Application...
3
by: SHC | last post by:
Hi all, 1) I have used VC++.NET 2002 (v7.0) for a while. Recently I just installed VC++.NET 2003 (v7.1) - I saw the message "Settings were not migrated from Visual Studio.NET 2002 to Visual...
3
by: .NET Developer | last post by:
Currently all of our Dev/Test/Production servers have .NET Framework 1.0 on WIN 2000 servers. We use VS.NET 2002 for development. We have various applications such as InterNet app, IntraNet app,...
3
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. I'm trying to take text that has been copied onto the clipboard in my vb.net 2002 application and paste into a file that a command button opens, and...
10
by: Steve | last post by:
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains custom functions. I believe I need to use COM interop to allow VBA code in Excel 2002 to access it. I've studied...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.