Directory structure advice needed

  • Thread starter Thread starter D. Yates
  • Start date Start date
D

D. Yates

Hi,

I am interested in knowing what directory structure most people are using
for their projects.

Here's what I have and the problem I am encoutering:

I have setup a directory structure like this:
D:\C#Projects
D:\C#Projects\Apps
D:\C#Projects\Libraries
D:\C#Projects\Release

I would like all the libraries and applications to compile to one common
release directory, but I keep having problems with my libraries.

D:\C#Projects\Libraries\AllLibsSolution
D:\C#Projects\Libraries\AcmeCommon
D:\C#Projects\Libraries\AcmeDatabase
D:\C#Projects\Libraries\AcmeLists
D:\C#Projects\Libraries\AcmeSockets

AllLibsSolution - just a solution with all the following projects held
within:
AcmeCommon - depends on nothing (class library)
AcmeDatabase - depends on AcmeCommon (class library)
AcmeSockets - depends on AcmeCommon (non-visual control)
AcmeLists - depends on AcmeCommon and AcmeSockets (non-visual control)

If I set the output directory for these four libraries to ..\..\Release, I
will get the following:
Could not copy temporary files to the output directory.
The custom tool 'AcmeClientSocket' failed while processing the file
'AcmeClientSocket.cs'.
The file 'AcmeSockets.dll' cannot be copied to the run directory. The
process cannot access the file because it is being used by another process.

Afterwards, the D:\C#Projects\Release directory contains:
AcmeCommon.dll
AcmeDatabase.dll
AcmeLists.dll
AcmeSockets.dll

It looks like the AcmeLists brought the AcmeSockets.dll into the release
directory and prevented the AcmeSockets project from compiling.

Any ideas or suggestions for deploying controls and libraries without using
the GAC will be greatly appreciated.

Thanks,
Dave
 
Clinton,

Thank you for your reply. I'm still trying to figure out how to deal with
references and components (controls and code libraries).

The problem that I have is knowing which DLL is being picked up by the
toolbox and all the applications that reference the libraries. The only
solution I came up with for my libraries is to create a build directory for
each library and build both release and debug to this location. Afterwards,
point the toolbox and all applications at this one location. For example:

D:\C#Projects\Libraries\AcmeCommon\Build
D:\C#Projects\Libraries\AcmeDatabase\Build
D:\C#Projects\Libraries\AcmeLists\Build
D:\C#Projects\Libraries\AcmeSockets\Build

With applications I stick with the default bin\debug and bin\release
directory to store builds.

With this library directory structure, I can add the library projects to my
application solutions and build debug or release and I KNOW which library
DLL is being picked up. As opposed to pointing applications library
references at a release directory.

My only apprehension is that I feel like I'm circumventing the purpose
behind the bin\release and bin\debug defaults. There was obviously a
purpose for this in Microsoft's mind, but it seems to create problems with
toolbox controls and application references. Maybe it was only intended for
applications alone.

I'd be really surprised if nobody has encountered this problem before, but
I've search google without success. At any rate, I'm still open to
suggestions.

Thanks,
Dave
 
Back
Top