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

BC30466: Namespace or type cannot be found - different approach!

Hi All,

I have searched for this problem but unusually have had no luck!

I have an .vb file in the code directory with the following simplified
code in it:

Namespace MyTest
Public Class returnClass
Public Shared Function returnString() As String
Return "test"
End Function
End Class
End Namespace

I now want to import this class into an aspx file. My .net
intellisense picks up the namespace and class and allows me to import
it as follows:

Imports MyTest.returnClass

and kicks out zero errors!

When I fire up the aspx page I get the 'dreaded':-

Compiler Error Message: BC30466: Namespace or type 'returnClass' for
the Imports 'MyTest.returnClass' cannot be found.

Note: The .vb file is not compiled but should compile at run time,
provided it is in the /code directory, should'nt it?

Help will be appreciated as would donations!
Nov 19 '05 #1
1 1586
If you are using source file in the /code directory
of your application, you don't need to import the
classes in the source files to your aspx files.

You can just reference them in your aspx file,
and they will work without references!

Visual Studio monitors the /Code directory and when
new components are added, compiles them.

The components in the Code subdirectory are
compiled by default into a single assembly.

The assembly is then automatically referenced
in the project and available to all pages in the site.

Eliminate :
Imports MyTest.returnClass and everything should work
[ unless you have other errors, of course... ;-) ]

Juan T. Llibre
ASP.NET MVP
===========
"sorCrer" <ju**@spirit.co.za> wrote in message
news:dc**************************@posting.google.c om... Hi All,

I have searched for this problem but unusually have had no luck!

I have an .vb file in the code directory with the following simplified
code in it:

Namespace MyTest
Public Class returnClass
Public Shared Function returnString() As String
Return "test"
End Function
End Class
End Namespace

I now want to import this class into an aspx file. My .net
intellisense picks up the namespace and class and allows me to import
it as follows:

Imports MyTest.returnClass

and kicks out zero errors!

When I fire up the aspx page I get the 'dreaded':-

Compiler Error Message: BC30466: Namespace or type 'returnClass' for
the Imports 'MyTest.returnClass' cannot be found.

Note: The .vb file is not compiled but should compile at run time,
provided it is in the /code directory, should'nt it?

Help will be appreciated as would donations!

Nov 19 '05 #2

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

Similar topics

1
by: John L. Clark | last post by:
I am curious as to the rationale, and effect, of having default namespaces not applying (directly) to attributes (see http://www.w3.org/TR/REC-xml-names/#defaulting). Given an attribute without a...
7
by: Kai-Uwe Bux | last post by:
Hi folks, I observed something that puzzles me. When I do namespace xxx { using std::swap; } it appears that xxx::swap and std::swap are not strictly equivalent. In particular, I think...
6
by: SpOiLeR | last post by:
Why doesn't following code compile? Problem line is commented in code. ---------------------- Cut here------------------------------- #include <iostream> #include <list> #include <string> ...
20
by: Patrick Guio | last post by:
Dear all, I have some problem with insertion operator together with namespace. I have a header file foo.h containing declaration of classes, typedefs and insertion operators for the typedefs in...
5
by: Sting | last post by:
I had a working .net program I've re-installed XP (defective harddisk). and now i keep getting BC30466: Namespace or type 'test' for the Imports 'test' cannot be found. The assembly is called...
0
by: George | last post by:
I have an aspx page, this page instance a Dll make for me, this Dll imports System.Data.OracleClient, I Add the Reference in the project and use the gcautil -i but the error "Namespace or type...
2
by: Phil Certain | last post by:
Hi, Relative newbie to .Net but experienced with classic ASP. I am trying to create a simple business object to contain commonly used functions. This is what I have done: 1 - Created a simple...
4
by: David A | last post by:
I'm trying to "isolate" some unmanaged calls to DLLs in a separate namespace so I can have all the unmanaged calls to DLL functions in a separate module and then these can be called from any other...
3
by: sjt003 | last post by:
I have been developing web apps in Visual Studio 2003, but since the other developers in my office don't use Visual Studio, I may have to stop too unless there is an efficient way for them to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.