Compilation problem for component

B

Bob H

Hi,

I've a simple component that references another component (that I've
compiled into a dll):
Imports myapp.MyClass 'compiled into Data1
Imports System
Namespace Data2
.....etc
End Namespace

I'm trying to compile Data2 using "vbc /t:library /r:System.dll,Data1.dll
data2.vb" using the DOS commandline and it's not finding the data1.dll
library (I'm in the application dir). I've tried putting the data1.dll in
the app directory and the /bin dir, but still the same problem.

Any clues please as to where I'm going wrong?

Thanks

Bob
 
C

Cowboy \(Gregory A. Beamer\)

What error? Does it say something about namespaces? If so, you need to use
an /imports for the namespace as well as a reference for the dll.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
B

Bob H

I managed to find the library by adding the Data1 dll as a reference to the
project (which I hadn't done - I thought I could reference dll's using
MyApp.Data1) - through Project/Add reference/Projects. Am I right in
thinking that all separate components that I compile need to to be added to
the Project this way? I'm now getting the following error:

Error BC30389 Data1.Property is not accessible in this context because it is
Private.
I've been able to work with the properties of the Data1 component okay if I
import the .vb file of Data1 (Imports Myapp.Data1). As soon as I reference
the dll version (Imports Data1), I'm getting the above error.

Any clues?

Thanks.

bob
 
B

Bob H

if I make my classes in the components Public, it works okay - I had
declared a few as Friends. Should this have caused this type fo error?

Thanks.
 

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