Class Library

B

Brian Shannon

I am playing around with class libraries trying to understand how they work.

I created a class library, library.vb.
I placed the library.dll into the bin directory and set my reference.

If I update the library.dll can I Just place the new .dll in the bin
directory or do I need to recompile my program.

During testing I am just placing the new library.dll in the bin directory
and don't get any of the updates I made until I re-reference the
library.dll. This is all taking place in designer. From my reading I
thought you should only have to place the new .dll in the root bin
directory.

Thanks for any input.
 
S

Scott M.

You only need to place the new .dll into the bin directory of the
application that uses it, but a better way to do it is to just hit the
refresh button of the Solution Explorer window in the application that uses
library.dll.

This will go get a new copy of library.dll for you.
 
K

Kevin Spencer

Assuming that you're using Visual Studio.Net: If you put the Class Library
Project into the same Solution as the project using it, and create a
reference to the PROJECT (not the DLL), it will automatically update.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
B

Brian Shannon

For now I will only be using the Class Library in one project. But in the
future when I get more expiereance I can see the one .dll being used over
multiple projects. Would I still want to put the Class Library in the same
solution as my project?

Thanks
 
K

Kevin Spencer

A Solution can contain multiple projects. Projects can be shared among more
than one Solution. You can use the same Project in multiple Solutions. The
Class Library is a project. Its output is a DLL. When you use the Class
Library Project in a Solution, and reference the Project, the DLL is
compiled and used with the Solution when you compile. It works the same no
matter how many Solutions you put it into.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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