Andrew Bullock
Andrew Bullock

Reputation: 37378

msbuild, multiple projects and dependency resolution

I have solution that consists of 10 projects. Each project has a test assembly (making 20 projects).

Currently, my build script builds all the test assemblies, then runs all the tests, great. Except that each test assembly references 2 or more of the core assemblies (directly and indirectly), which means there is lots of redundant building going on.

How can I simplify things (without reducing number of assemblies) to speed up the build?

I guess I could build each project directly without resolving the inter-project references and bung it all in a single output dir, but how do i still resolve the other references projects have to 3rd aprty ddls etc.

Other suggestions?

thanks

Upvotes: 0

Views: 1506

Answers (2)

Jupaol
Jupaol

Reputation: 21365

I am working on a tool to automate the build process it is still on development and it's open source here is the link:

https://github.com/jupaol/NCastor

To speed up your build you could try to build in parallel your projects:

To force MSBuild to use a single output directory:

<BuildProperties>
  Configuration=$(Configuration);
  Platform=$(Platform);
  OutputPath=$(BuildingPath);
  $(BuildProperties);
</BuildProperties>
<MSBuild Projects="$(FullSolutionFilePath)" Properties="$(BuildProperties);" Targets="ReBuild"/>

Upvotes: 1

DaveE
DaveE

Reputation: 3637

Can you build the referenced assemblies first, copy them to a "Common" folder, and have the "Common" folder assemblies referenced in the using projects as "Referenced Libraries"?

We do this with our CompanyName.Enterprise libraries and it works fine. They get built once or twice a year and the projects using them build daily.

Upvotes: 0

Related Questions