473,769 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiler error: Type not defined inspite of available class

Jay
Hi,
I have been working on ASP.NET 2.0. When I was trying to work with one of
the master pages, I used some classes (.vb files) in App_code directory. When
the application is run, it gives me the following error.

BC40056: Namespace or type specified in the Imports 'XXXX' doesn't contain
any public member or cannot be found. Make sure the namespace or the type is
defined and contains at least one public member. Make sure the imported
element name doesn't use any aliases.

I have verified and the class file is present in the App_code directory with
the namespace defined. Please help me. I am not sure as to what I am doing
wrong.

Rgds.

Jan 11 '06 #1
1 2985

"Jay" <Ja*@discussion s.microsoft.com > skrev i en meddelelse
news:63******** *************** ***********@mic rosoft.com...
Hi,
I have been working on ASP.NET 2.0. When I was trying to work with one of
the master pages, I used some classes (.vb files) in App_code directory.
When
the application is run, it gives me the following error.

BC40056: Namespace or type specified in the Imports 'XXXX' doesn't contain
any public member or cannot be found. Make sure the namespace or the type
is
defined and contains at least one public member. Make sure the imported
element name doesn't use any aliases.

I have verified and the class file is present in the App_code directory
with
the namespace defined. Please help me. I am not sure as to what I am doing
wrong.


I get the same error when I work in the VS 2005 IDE. The project compiles
and works OK though, but I get squiggly lines under the "undeclared " method
calls.

I have copied MS Data Access Application Blocks dll to the bin, added a
reference, and at the top of frmTst.aspx.vb, I do "imports
Microsoft.Appli cationsblocks.D ata", and it looks (and works) great. After
some developing, all of a sudden I see the squiggly lines, and the error you
mention is displayed as a tooltip-text when I hover over the "imports... ."
statement.

/jim
Jan 26 '06 #2

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

Similar topics

3
291
by: Chris Peacock | last post by:
Using Visual Studio .NET 2003, I'm intermittently getting the VB.NET error BC30002 ("Type ... is not defined.") when I build a particular assembly that I have written. This error does not occur every time the assembly is built, and seems more likely to occur when a change has been made in the assembly and it is another dependent assembly that is being built. The type that it claims is not defined is a nested class which is derived from...
19
3556
by: Alf P. Steinbach | last post by:
// As usual the error message directs one to the report the bug. // // And as usual there is absolutely no way to do so without paying for // the privilege... // // Or using three or four hours to find the _current_ reporting page... #include <vector> #include <iostream>
3
1423
by: N4M | last post by:
Dear, I have codes as follows: template<class T> class A { public: // embedded class class E; public: // types typedef E TE; public:// member functions TE somefunc();
13
2029
by: Eric | last post by:
I have a template class that instantiates a variable of the template parameter type as follows: template <class T> struct TemplateClass { T t; }; struct TestClass
5
33691
by: Lou Pecora | last post by:
g++ compiler error question. I have a container C whose constructor takes a class B that is inherited from an abstract class A. So I have the line of code: B binstance; C cinstance(binstance); The compiler gives the error,
19
3581
by: Martin Oddman | last post by:
Hi, I have a compiling problem. Please take a look at the code below. I have an application that is built upon three tiers: one data tier (Foo.DataManager), one business tier (Foo.Kernel) and one web presentation tier (Foo.WebFiles). The data tier shall only be accessible thru the business tier so I do NOT want a reference to the data tier in the presentation tier. In the business tier I have a class with the name CategoryItem that...
0
23511
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
0
2058
by: erik.erikson | last post by:
I am getting a compiler error that I can't well explain or even understand the origin of (though I boiled it down close...). Below is a bare-bones example. What I am doing is defining the increment operator in a class and then defining a derived class and using the derived class. When I try to use the increment operator on an instance of the derived class (as an instance of the derived class, not when used as an instance of the base...
3
1958
by: Mike S | last post by:
Maybe I'm missing some fundamental unwritten law of OOP, but I was wondering why the VB.NET compiler doesn't take advantage of the fact that all .NET objects, being derived from the Object base class, have a ToString method defined on them, when a reference type is used in an expression where a String is expected. I mean if you define a class MyClass in MyNamespace and don't override ToString, calling ToString will return the qualified...
0
9424
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.