Large scale C# development

  • Thread starter Thread starter Ivan Krivyakov
  • Start date Start date
I

Ivan Krivyakov

Let's say I have a big system with several dozen C# projects - some
of them class libraries, some of them applications. Executables and
libraries from higher layers depend on libraries from lower layers.

The system usualy has two builds: debug build and release build.
Debug libraries and executables depend on other debug libraries,
and release libraries and executables depend on release libraries.

The question is: how do I accomplish this without building one huge
solution file with a lot of projects?

As far as I understand, for each C# project I must specify its
references.

There are two type of references - regular references and project references.
Regular references can reference only a single DLL. There is no way to
distinguish between Debug and Release. Project references behave the
way I want - Debug build will reference Debug library, and Release build
will reference Release library, but they assume target project is in the
same solution as my current project.

Thus, if I want to use project references, it will lead to a huge .sln file
with dozens of projects in it. Such file is very difficult to work with, because
of speed and memory problems.

In C++ world we solved this problem by creating smaller solution files
with just a couple of projects in each, and handling overall system dependencies
in a makefile, that invoked compilation of individual solutions.

But in C# I cannot do it because of project references.

What method to you use for your large-scale C# system?

Thanks in advance,
Ivan Krivyakov
 
Ivan,
As far as I understand, for each C# project I must specify its
references.

Build "smaller" assemblies and install them in the GAC.

Regards,

Randy
 
You may use kind of setup project called ReferenceCollector
(for instance).
All what he will do - compile needed DLLs ant output them
into defined place - same place for all developers.
-----Original Message-----
Let's say I have a big system with several dozen C# projects - some
of them class libraries, some of them applications. Executables and
libraries from higher layers depend on libraries from lower layers.

The system usualy has two builds: debug build and release build.
Debug libraries and executables depend on other debug libraries,
and release libraries and executables depend on release libraries.

The question is: how do I accomplish this without building one huge
solution file with a lot of projects?

As far as I understand, for each C# project I must specify its
references.

There are two type of references - regular references and project references.
Regular references can reference only a single DLL. There is no way to
distinguish between Debug and Release. Project references behave the
way I want - Debug build will reference Debug library, and Release build
will reference Release library, but they assume target project is in the
same solution as my current project.

Thus, if I want to use project references, it will lead to a huge .sln file
with dozens of projects in it. Such file is very
difficult to work with, because
 
Yura2000 said:
You may use kind of setup project called ReferenceCollector
(for instance).
All what he will do - compile needed DLLs ant output them
into defined place - same place for all developers.

How do you deal with Debug/Release problem?
Same question goes to Randy.

Ivan
 
Back
Top