including specific files in a build

  • Thread starter Thread starter Aashish
  • Start date Start date
A

Aashish

Hi,

How do I select files from a project that I want included
in a library. I have a bunch of forms and a bunch of class
files. I want just the class files included in the library
and not the forms. The forms need to be built into a Win32
application.

Any idea?

Thank you
Aashish
 
By library, I assume you mean "DLL"?
The .Net term is "assembly".

If you are using Visual Studio, simply place the files that you want to
occur in a single assembly in a single project.

Your app would have two projects. One would be compiled to a dll. The
other would be compiled to an exe.

Does this help?

--- Nick
 
Hi,

Thanks for the reply. Yes I was referring to a dll.

Thats one way to do it. However, I was wondering if there was some way
to select files from one project itself to create a dll.

Regards
Aashish
 
Yes... you can create a new project and link in the files from the old
project. Not sure why you'd want to do this... it would be pretty frail.

To link in a file, create the new project. In VS, select the project in the
solution explorer, right click, and select "Add Existing Item".
In the browse dialog, find the old file. Instead of selecting the default
button, you will see a drop-down arrow right next to the button (I don't
remember the text of the default button right now... sorry). click the
drop-down and select "link file"

Better way, create the dll with the base classes and link the DLL into BOTH
the old project and the new one.

--- Nick
 
Hi Nick,

I eventually ended up creating two different projects. Just dragged the
needed files from one project to another.

To clarify what I wanted:
I am just migrating from Java and in Eclipse Java IDE, its possible to
select specific Java packages from a source tree that need to be
included in a Java Archive (jar). I was wondering whether something
similar was possible in VS.NET

Thanks again for your help

Aashish
 
Back
Top