I am using VB.net with ASP.net 2.0 and am not using Visual Studio. I use my text editor. I have written a class and wrapped it in a namespace called "MyBulb_NS". I want to import and use that namespace in another namespace that i've written called "MyLamp_NS". I have pasted a code snippet below to show how i import the namespace. MyBulb_NS has been compiled to a dll without errors. When I attempt to compile MyLamp_NS it fails. I have pasted its makefile and error below
I am frustrated that it is so difficult to use a custom class in a different custom class. What needs to be done to get this to work? Please help! TIA!
makeMyLamp.bat
------------------------------------
set indir=c:\www\components\MyLamp.vb
set outdir=c:\www\bin\MyLampVB.dll
set assemblies=System.dll,System.Data.dll,System.XML.dll
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:library /out:%outdir% %indir% /r:%assemblies%
pause
Error from command line
------------------------------------------------
c:\www\components\MyLamp.vb(7) : warning BC40056: Namespace or type specified in the Imports 'MyBulb_NS' 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.
Imports MyBulb_NS
I am frustrated that it is so difficult to use a custom class in a different custom class. What needs to be done to get this to work? Please help! TIA!
Code:
'Code snipped from MyLamp.vb
Option Explicit
'Option Strict
Imports System
Imports System.Data
Imports System.Data.OleDB
Imports MyBulb_NS
Namespace MyLamp_NS
Public Class MyLamp
...
private bulb as new MyBulb
...
End Class
End Namespace
makeMyLamp.bat
------------------------------------
set indir=c:\www\components\MyLamp.vb
set outdir=c:\www\bin\MyLampVB.dll
set assemblies=System.dll,System.Data.dll,System.XML.dll
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:library /out:%outdir% %indir% /r:%assemblies%
pause
Error from command line
------------------------------------------------
c:\www\components\MyLamp.vb(7) : warning BC40056: Namespace or type specified in the Imports 'MyBulb_NS' 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.
Imports MyBulb_NS