Problems with command line compiler.

M

Matt Creely

I'm using the vbc.exe to compile a .dll automatically for me. I have
all my framework references and imports setup correctly. And it will
compile just fine, with a few lines of code commented out.

Here's the problem. I have a vb class in my project("gamelan") called
"Utilities". It's a public class, with a bunch of public shared
methods I use through out the site. So when I try to compile, I get
this error:

C:\xxx\xxx\Comments.aspx.vb(64) : error BC30451: Name 'gamelan' is
not declared.

intUserID = gamelan.Utilities.CIntSpecial(strUserID)
~~~~~~~

I can compile from Visual Studio just fine. But from the command
line, I get this error whenever I access the "gamelan.Utilities"
class. How does the IDE get around this problem when it compiles?
How can I make a reference/import to a class that hasn't been compiled
yet (since it's PART of the project itself)?
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (Matt Creely) scripsit:
I'm using the vbc.exe to compile a .dll automatically for me. I have
all my framework references and imports setup correctly. And it will
compile just fine, with a few lines of code commented out.

Here's the problem. I have a vb class in my project("gamelan") called
"Utilities". It's a public class, with a bunch of public shared
methods I use through out the site. So when I try to compile, I get
this error:

C:\xxx\xxx\Comments.aspx.vb(64) : error BC30451: Name 'gamelan' is
not declared.

intUserID = gamelan.Utilities.CIntSpecial(strUserID)
~~~~~~~

I can compile from Visual Studio just fine. But from the command
line, I get this error whenever I access the "gamelan.Utilities"
class. How does the IDE get around this problem when it compiles?
How can I make a reference/import to a class that hasn't been compiled
yet (since it's PART of the project itself)?

Add "/rootnamespace:gamelan" to your "vbc.exe" command line.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top