By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,339 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,339 IT Pros & Developers. It's quick & easy.

How do I add libraries to my vb.net project?

P: n/a
I have several questions about vb.net projects:

1. When I compile my project, it produces a 'bin' folder and an 'obj'
folder and within the 'obj' folder are 2 other folders - 'debug' and
'release'. If I want my code to access a dll that a third party
produced, where do I put that dll. In 'bin'?, In 'debug'? In 'obj'?

2. I find that when I compile my project into an exe, that I have
several copies of that exe in different places. One was in 'bin', one
was in 'debug' and one was in 'release'. Why would I have three of
them?

3. If I want my code to access a third party dll, does that mean I
should have a 'add references' to that dll? Or is just adding the dll
to the 'bin' directory sufficient?

4. I made a 'solution' which had 2 projects in it - one was source for
a dll of my own, and one was source for a exe that calls the dll. I
thought that I needed 'add references' to make the caller know about
the dll. But 'add references' brings up a screen with several tabs.
The dll project was listed in one of the tabs, but that was not
enough. The caller program did not recognize code statements that
referred to the class in the dll. So I used another tab (of add-
references) where I browsed for the 'bin' directory of the dll
project, and once I did that, the caller exe worked with it. But is
that really what I should be doing?

5. Is there a book out there that addresses issues like these?

Thanks,
HA

Jul 3 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi -

1. When I compile my project, it produces a 'bin' folder and an 'obj'
folder and within the 'obj' folder are 2 other folders - 'debug' and
'release'. If I want my code to access a dll that a third party
produced, where do I put that dll. In 'bin'?, In 'debug'? In 'obj'?
Neither. Add a reference to the DLL by browsing to it. VS2005 will do
the rest.
2. I find that when I compile my project into an exe, that I have
several copies of that exe in different places. One was in 'bin', one
was in 'debug' and one was in 'release'. Why would I have three of
them?
The debug and release folders are named based on the configuration
name. Without getting too complicated, depending on which
configuration your using when you compile the application, the
resultant exe file resides in the respective folder. (Note: you can
create additional configurations, in which case, the respective folder
would be created, but that's outside the scope of this post.)
3. If I want my code to access a third party dll, does that mean I
should have a 'add references' to that dll? Or is just adding the dll
to the 'bin' directory sufficient?
See 1.
4. I made a 'solution' which had 2 projects in it - one was source for
a dll of my own, and one was source for a exe that calls the dll. I
thought that I needed 'add references' to make the caller know about
the dll. But 'add references' brings up a screen with several tabs.
The dll project was listed in one of the tabs, but that was not
enough. The caller program did not recognize code statements that
referred to the class in the dll. So I used another tab (of add-
references) where I browsed for the 'bin' directory of the dll
project, and once I did that, the caller exe worked with it. But is
that really what I should be doing?
On the application project, you would add a project reference (Add a
Reference, you'll see the class library project in the project tab).
Every time you compile the app, it will compile the dll library, then
your application. (Note: this is also configurable)
5. Is there a book out there that addresses issues like these?
There are a TON of books, and since I'm not being paid to endorse any
of them, I'd recommend that you start with MSDN, since it is a free
resource. Straight from the horses mouth, as it were.

Cheers,

-Mark

Jul 3 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.