Multiple projects

  • Thread starter Thread starter Chad Crowder
  • Start date Start date
C

Chad Crowder

Recently I took some smaller .net projects and placed them all in one "main"
project. I essentially took the project folders, moved them physically
under one project (called the "master" project), and then went through each
of the "sub" projects directories and removed the global.asax file, and
updated the webinfo and web.config files.

This all works great, but the problem I run into is that I've found I have
to manually copy the "sub" project's DLL files into the "main" project's bin
directory everytime I do a build (well, only when I do a build - after I
make a change).

Basically, I'm thinking that there's probably a better way to merge projects
together, or a way to have Visual Studio build the dll files to the "master"
project.

Anyone have a suggestion for me? Thanks!

- Chad
 
Do you still have several csproj files, one for each subproject? Are these
all under one solution?

Or have you actually merged the files from the other projects into one
csproj (or the VB equivalent, depending on what you use), so that all the
files actually belong to just one project, which belongs to just one
solution? (Files can also belong to one project even if they're in a
subdirectory)

If you just have one ASP.NET project, that should build only one assembly
dll, which will end up under the single bin folder of your web application.

From where are you manually copying the "sub" projects files to your main
bin directory? If you're getting them from other bin folders which are in
the sub projects directory, then this is probably where the problem is - you
have multiple web projects, and the sub projects are building their own
separate dlls, whereas you should remove these projects, and add the files
in them to the main project.

Let me know if that helps at all? Its not easy to explain.

Pete Beech
 
When you reference the DLLs just use the "Project" tab (I think it's
the third one, all the way to the right) rather than browsing for the
DLL (assuming that your DLL is in the same solution file). If you do
that then it will establish a relationship between the DLL project
(which is a part of the same solution) and the referencing project(s).
From then on building your projects will also cause the referenced DLL
to be rebuilt and linked in dynamically. This keeps you from having to
manually dereference and rereference (is that a word?) the DLL
everytime you change it.
 
Back
Top