Re: Class not getting built
- From: "tshad" <tfs@xxxxxxxxxxxxxx>
- Date: Sat, 13 Sep 2008 14:37:43 -0700
I did try to run a makeBitHandling.bat file from the console and put the
..dll into a bin folder that I created which is how I did it in VS 2003.
vbc /t:library bitHandling.vb /r:system.dll
attrib ..\bin\bitHandling.dll -r
copy bitHandling.dll ..\bin\*.*
The .bat file wouldn't work correctly. It gave me the error:
'???vbc' is not recognized as an internal or external command,
operable program or batch file.
Not sure what the prefix characters are but if I copy the lines and paste
them into the console, it works fine and puts the .dll file into the bin
folder.
Now when I type in:
Imports MyFunctions
It recognizes it. When I type it "Imports ", Intellisense shows MyFunctions
in the list - so it does see it.
but all the functions: BitClear, BitSet and BitIsSet all show as undefined.
And you can see the class below where all the functions are private.
Why doesn't the program see them????
Thanks,
Tom
"tshad" <tfs@xxxxxxxxxxxxxx> wrote in message
news:ewW2dVdFJHA.3288@xxxxxxxxxxxxxxxxxxxxxxx
I need to find out why this is not compiling.
I can't go any further without it. I am getting "not defined" errors for
all the functions in this class.
This is just a class not an aspx.vb page. And it is included in the
project.
It is a very simple Web Site project with very little in it at this point.
It has the App_Code, Images, and CSS folders and default.aspx is in the
root.
I have put my BitHandling.vb in the root and in the App_Code folder and it
seems to ignore it.
Why is that?
Thanks,
Tom
"tshad" <tfs@xxxxxxxxxxxxxx> wrote in message
news:uEpckkWFJHA.4260@xxxxxxxxxxxxxxxxxxxxxxx
I have the following class in my VS 2008 project that has a namespace of
MyFunctions.
*********************************
Imports System
Imports System.Text.RegularExpressions
Namespace MyFunctions
Public Class BitHandling
'*----------------------------------------------------------*
'* Name : BitSet *
'*----------------------------------------------------------*
'* Purpose : Sets a given Bit in Number *
'*----------------------------------------------------------*
Public Shared Function BitSet(ByVal Number As Integer, _
ByVal Bit As Integer) As Long
If Bit = 31 Then
Number = &H80000000 Or Number
Else
Number = (2 ^ Bit) Or Number
End If
BitSet = Number
End Function
'*----------------------------------------------------------*
'* Name : BitClear *
'*----------------------------------------------------------*
'* Purpose : Clears a given Bit in Number *
'*----------------------------------------------------------*
Public Shared Function BitClear(ByVal Number As Integer, _
ByVal Bit As Integer) As Long
If Bit = 31 Then
Number = &H7FFFFFFF And Number
Else
Number = ((2 ^ Bit) Xor &HFFFFFFFF) And Number
End If
BitClear = Number
End Function
'*----------------------------------------------------------*
'* Name : BitIsSet *
'*----------------------------------------------------------*
'* Purpose : Test if bit 0 to bit 31 is set *
'*----------------------------------------------------------*
Public Shared Function BitIsSet(ByVal Number As Integer, _
ByVal Bit As Integer) As Boolean
BitIsSet = False
If Bit = 31 Then
If Number And &H80000000 Then BitIsSet = True
Else
If Number And (2 ^ Bit) Then BitIsSet = True
End If
End Function
End Class
Public Class Strings
'*----------------------------------------------------------*
'* Name : StripHtml *
'*----------------------------------------------------------*
'* Purpose :Strip HTML tags from Text *
'*----------------------------------------------------------*
Public Shared Function stripHTML(ByVal strHTML As String) As String
'Strips the HTML tags from strHTML
Dim strOutput As String
Dim objRegExp As New Regex("<(.|\n)+?>", RegexOptions.IgnoreCase)
'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strHTML, "")
'Replace all < and > with < and >
strOutput = strOutput.Replace("<", "<")
strOutput = strOutput.Replace(">", ">")
stripHTML = strOutput 'Return the value of strOutput
End Function
End Class
End Namespace
**********************************
In my default.aspx.vb I have:
Imports MyFunctions
But I am getting an error:
*************************************************
Namespace or type specified in the project-level Imports 'MyFunctions'
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 alias name doesn't contain other aliases.
*************************************************
But the above, namespace does exist and has public members (all of which
give me errors in my code saying that they are not declared?
I tried putting this file in the root as well as the under a folder
called "Classes" as I had it in my 2003 project and I also tried putting
it in the App_Code folder. None of which worked.
What am I missing?
Thanks,
Tom
.
- References:
- Class not getting built
- From: tshad
- Re: Class not getting built
- From: tshad
- Class not getting built
- Prev by Date: Re: Accessing appDomain members from another appDomain
- Next by Date: Re: Help me sell SQL Server over MySQL...
- Previous by thread: Re: Class not getting built
- Next by thread: Re: Class not getting built
- Index(es):
Relevant Pages
|