Solution - Project and common files

  • Thread starter Thread starter Marty
  • Start date Start date
M

Marty

Hi,

I am building a solution with 2 projects within it. There is several
common classes (.vb) files between the two projects.

How can I seperate common classes from private classes for each project
in the same solution? How do I set them in the project explorer?

Thank you

Marty
 
Marty said:
I am building a solution with 2 projects within it. There is several
common classes (.vb) files between the two projects.

How can I seperate common classes from private classes for each project in
the same solution? How do I set them in the project explorer?

Add a new project of type "Class Library", then add the classes which are
shared between two or more projects in the solution to the class library
project and reference the class library project from your other projects.
The classes only need to be added to the class library, and not to the other
projects in the solution.
 
You can share at compiled-level (sharing the binary) using a Class Library
as explained in the other post, or you can share at source code level,
putting the common files in a folder and using the "Link File" option in the
dropdown button of the Add Existing Item dialog.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
 

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

Back
Top