dave4dl
asked on
VB.NET Compile Error - Namespace cannot be found
Hi,
This is probably a simple question because i am a newbie at this. I have created a vb class in the visual studio 2002 environment. I can compile and test the class just fine through the IDE but when i try to compile the code using vbc.exe it generates an error.
I run:
"F:\WINDOWS\Microsoft.NET\ Framework\ v1.0.3705\ vbc" /nologo /t:library "F:\My Programs\Mp3 Cataloger\mp3Info.vb"
And then i get:
F:\My Programs\Mp3 Cataloger\mp3Info.vb(4) : error BC30466: Namespace or type 'RegularExpressions' for the Imports 'System.Text.RegularExpres sions' cannot be found.
Imports System.Text.RegularExpress ions
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
The weird thing is my other imports work just fine (listing of imports following):
Imports System.IO
Imports System
Imports Microsoft.VisualBasic
Imports System.Text.RegularExpress ions
When i dont include the regular expressions (and i comment out the instances of regex i create in the code) it compiles just fine.
Can anyone tell me how to make this compile?
This is probably a simple question because i am a newbie at this. I have created a vb class in the visual studio 2002 environment. I can compile and test the class just fine through the IDE but when i try to compile the code using vbc.exe it generates an error.
I run:
"F:\WINDOWS\Microsoft.NET\
And then i get:
F:\My Programs\Mp3 Cataloger\mp3Info.vb(4) : error BC30466: Namespace or type 'RegularExpressions' for the Imports 'System.Text.RegularExpres
Imports System.Text.RegularExpress
~~~~~~~~~~~~~~~~~~~~~~~~~~
The weird thing is my other imports work just fine (listing of imports following):
Imports System.IO
Imports System
Imports Microsoft.VisualBasic
Imports System.Text.RegularExpress
When i dont include the regular expressions (and i comment out the instances of regex i create in the code) it compiles just fine.
Can anyone tell me how to make this compile?
Do you have a path to your C:\WINDOWS\Microsoft.NET\F ramework\v 2.0.50727 or v1.4.3 etc etc etc...or 1.03 etc etc
ASKER
my user "path" environmental variable is:
F:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT; F:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin; F:\Program Files\Microsoft Visual Studio\Common\Tools;F:\Pro gram Files\Microsoft Visual Studio\VC98\bin;F:\WINDOWS \Microsoft .NET\Frame work\v1.0. 3705
system "path" variable =
%SystemRoot%\system32;%Sys temRoot%;% SystemRoot %\System32 \Wbem;F:\P rogram Files\Microsoft SQL Server\80\Tools\BINN;F:\WI NDOWS\Micr osoft.NET\ Framework\ v1.0.3705
F:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;
system "path" variable =
%SystemRoot%\system32;%Sys
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the post Wabbit,
I did try that reference and it didnt seem to help.
I found an interesting page at http://www.windowsdevcenter.com/pub/a/oreilly/windows/news/csharp_0101.html
that says i should reference System.Text.RegularExpress ions.dll but i cannot find that file anywhere on my system. I updated the .NET framework 1 and i still cannot find it. How do i get this file? Are regular expressions not available unless you buy the Visual Studio IDE?
I did try that reference and it didnt seem to help.
I found an interesting page at http://www.windowsdevcenter.com/pub/a/oreilly/windows/news/csharp_0101.html
that says i should reference System.Text.RegularExpress
ASKER
Well tried referencing System.dll in my compile command and it worked. I could have sworn i tried that earlier and it didnt work. Maybe I updated .NET framework . . .
Oh well, thanks for the help LordWabbit
Oh well, thanks for the help LordWabbit