The Namespace or type 'test' for the Import 'test' cannot be found.

The Namespace or type 'test' for the Import 'test' cannot be found.

Post by Bren » Fri, 05 Oct 2001 11:38:10



I've got a simple web page default.aspx with a:


statement. When i run it, i get this error:

---
Compiler Error Message: BC30466: The Namespace or type 'test' for the Import
'test' cannot be found.
Source Error:
Line 28: Imports System.Web.UI.HtmlControls
Line 29: Imports System.Web.UI.WebControls
Line 30: Imports test
Line 31:
Line 32: Namespace ASP
Source File: c:\WINNT\Microsoft.NET\Framework\v1.0.2914\Temporary ASP.NET
Files\testApp\87dc9c1f\d8606262\5afp9arj.0.vb    Line: 30
---

I have a class1.vb in this project that has the following:
---
Namespace test
    Public Class clsTest
        Public Sub New()
            MyBase.New()
        End Sub
        Public Function one(ByVal parm1IN As Integer) As String
            Return "It worked."
        End Function
    End Class
End Namespace
---

I'm NOT even declaring or calling the class yet. I get the error JUST from
the import statement.

The default.aspx and class1.vb are in the same folder. If i remove the
import statement, the page works, but I'm trying to learn how to encapsulate
business logic into namespaces and classes.

Do i need to compile class1.vb outside Interdev (B2SP2) or put an add
assembly line in the config.web?

Any ideas are appreciated?

Brent

 
 
 

The Namespace or type 'test' for the Import 'test' cannot be found.

Post by Serge Dudi » Fri, 05 Oct 2001 23:31:30


Hi, Brent,

Try place your assemblies into \bin folder.

Serge Dudin


> I've got a simple web page default.aspx with a:


> statement. When i run it, i get this error:

> ---
> Compiler Error Message: BC30466: The Namespace or type 'test' for the
Import
> 'test' cannot be found.
> Source Error:
> Line 28: Imports System.Web.UI.HtmlControls
> Line 29: Imports System.Web.UI.WebControls
> Line 30: Imports test
> Line 31:
> Line 32: Namespace ASP
> Source File: c:\WINNT\Microsoft.NET\Framework\v1.0.2914\Temporary ASP.NET
> Files\testApp\87dc9c1f\d8606262\5afp9arj.0.vb    Line: 30
> ---

> I have a class1.vb in this project that has the following:
> ---
> Namespace test
>     Public Class clsTest
>         Public Sub New()
>             MyBase.New()
>         End Sub
>         Public Function one(ByVal parm1IN As Integer) As String
>             Return "It worked."
>         End Function
>     End Class
> End Namespace
> ---

> I'm NOT even declaring or calling the class yet. I get the error JUST from
> the import statement.

> The default.aspx and class1.vb are in the same folder. If i remove the
> import statement, the page works, but I'm trying to learn how to
encapsulate
> business logic into namespaces and classes.

> Do i need to compile class1.vb outside Interdev (B2SP2) or put an add
> assembly line in the config.web?

> Any ideas are appreciated?

> Brent


 
 
 

The Namespace or type 'test' for the Import 'test' cannot be found.

Post by Bren » Sat, 06 Oct 2001 11:45:28


That worked!

I cant believe you have to compile those classes by hand. I thought the ide
would compile them for you.

Thank You,

Brent


> Hi, Brent,

> Try place your assemblies into \bin folder.

> Serge Dudin



> > I've got a simple web page default.aspx with a:


> > statement. When i run it, i get this error:

> > ---
> > Compiler Error Message: BC30466: The Namespace or type 'test' for the
> Import
> > 'test' cannot be found.
> > Source Error:
> > Line 28: Imports System.Web.UI.HtmlControls
> > Line 29: Imports System.Web.UI.WebControls
> > Line 30: Imports test
> > Line 31:
> > Line 32: Namespace ASP
> > Source File: c:\WINNT\Microsoft.NET\Framework\v1.0.2914\Temporary
ASP.NET
> > Files\testApp\87dc9c1f\d8606262\5afp9arj.0.vb    Line: 30
> > ---

> > I have a class1.vb in this project that has the following:
> > ---
> > Namespace test
> >     Public Class clsTest
> >         Public Sub New()
> >             MyBase.New()
> >         End Sub
> >         Public Function one(ByVal parm1IN As Integer) As String
> >             Return "It worked."
> >         End Function
> >     End Class
> > End Namespace
> > ---

> > I'm NOT even declaring or calling the class yet. I get the error JUST
from
> > the import statement.

> > The default.aspx and class1.vb are in the same folder. If i remove the
> > import statement, the page works, but I'm trying to learn how to
> encapsulate
> > business logic into namespaces and classes.

> > Do i need to compile class1.vb outside Interdev (B2SP2) or put an add
> > assembly line in the config.web?

> > Any ideas are appreciated?

> > Brent

 
 
 

1. WHY AM I GETTING THIS?:Namespace or type 'adodb' for the Imports 'adodb' cannot be found

Namespace or type 'adodb' for the Imports 'adodb' cannot be found.
I am creating a simple ASP.NET page to test a .NET component.

I am in the HTML text window of the .NET IDE with the following code:


Codebehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script language="VB" runat="server">

</script>
<html>
 <head>
  <title>WebForm1</title>
  <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
  <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
  <meta name="vs_defaultClientScript" content="JavaScript">
  <meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
 </head>
 <body MS_POSITIONING="GridLayout">
  <form id="Form1" method="post" runat="server">
  </form>
 </body>
</html>

MDA is my component - runs fine. When I try to run with the ADODB namespace
reference I get this error:
Namespace or type 'adodb' for the Imports 'adodb' cannot be found.

I have no idea what is going on. I have a reference to any and all ADODB
components.
ANy help would be appreciated.

2. Palm programs

3. Compiler Error Message: BC30466: Namespace or type 'Odbc' for the Imports 'Micro

4. Mesa/2 and Russian codepage

5. Cannot implicitly convert type 'System.Windows.Forms.MouseEventHandler' to 'System.EventHandler'

6. PIX as a Filter

7. 'TextBox' cannot have children of type 'DataBoundLiteralControl'.

8. (none)

9. Value of type 'String' cannot be converted to 'System.Drawing.Color'

10. Error: Cannot cast 'dbnull' into type 'string'

11. Cannot implicitly convert type 'object' to 'System.Web.UI.WebControls.TextBox'

12. Client found response content type of 'text/plain', but expected 'text/xml'

13. Compilation error: The type of namespace name 'AxMsCommLib' could not be found