BC30466: Namespace or type 'testNS' for the Imports 'testNS' cannot be found.

Hey,
  I'm trying to create a custom namespace that I can call from all my pages.
Here is the .vb code:

Namespace testNS
      Public Class testCls
            Public Sub testNamespace()
                  'do nothing
            End Sub
      End Class
End Namespace


The compiler command:

vbc /target:library /out:bin\testNS.dll testNS.vb


The aspx page:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%@Import Namespace="testNS" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

</body>
</html>



This doesn't do anything, but I'm using it to test.
The compiler runs without errors and creates a dll file in the \bin directory under my app folder.
When I load the aspx page I get this message:


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

Source Error:

Line 26: Imports System.Web.UI.HtmlControls
Line 27: Imports System.Web.UI.WebControls
Line 28: Imports testNS
Line 29:
Line 30: Namespace ASP


Source File: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\d16a94c5\8b912d73\py1siljr.0.vb    Line: 28


Anyone know why this is happening?
I could use some help on this one.

Thanks,
curlypinhead
LVL 2
curlypinheadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sachiekCommented:
Hi,
  I did the same you had given. It is working fine.
  I guess unless you had typed wrong Namespace or not correctly updated that DLL in bin this error will be coming for your.
  double check your namespace typed in your class file and wether DLL is correctly there in bin folder.

   To get your exact error i changed delebrately the namespace imported in aspx page to testNS1. I got the same error which you had posted above. That says all .  Hope you got it correct this time.

sachi
0
curlypinheadAuthor Commented:
I checked the spelling on all files (it looks exactly as above, in the original question).  What else could it be?  Any ideas?

Thanks,
curlypinhead
0
curlypinheadAuthor Commented:
Do you have to register the dll file or something?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

sachiekCommented:
You dont need to register DLL.


Sachi
0
curlypinheadAuthor Commented:
Hey,
  I figured out the suolution...

In IIS, you need to setup the directory for the project as an application.  Unless you do this, IIS does not look into the .\bin directory for dlls.

Please refund points.

Thanks,
curlypinhead
0
moduloCommented:
PAQed with points refunded (200)

modulo
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.