Artifacts and MSBuild project references

I am writing a build/ci/deploy process for very large system (300+ projects). This is a C# .net project and we are using Visual Studio for development IDE and MSBuild (from psake tasks) to compile our solutions.

There are multiple solutions containing multiple projects, to make matters worse some of projects are referenced as .csproj files and some are referenced as .dll. First step of build refactoring will be achiving that all projects will reference each other through the csproj file. This way I could create one master solution containing all the projects and use parallel build supported by MSBuild, this would serve perfect for CI build.

But for deploy builds I want to use chained builds and artefact dependencies.

I have imagined my build like:
1. Build CommonLibrarry
1.1 Store .dlls in artefacts as
2. Use artefacts from 1.1 and build CoreProduct
2.1 Store .dlls from CoreProduct in artefacts as
...etc (20 more steps like these)...

The problem is that CoreProduct has CommonLibrary references as .csproj and those .csproj files will not be present as CoreProduct build, and why would it be since the CommonLib has already been built and artefacts are ready.
The MSBuild project file (CSPROJ file) contains information about files that needs to be compiled and about references projects not the solution file, therefore I cannot create separate .csproj file for deployment system, developers would use and add their class files to different project file and I would have to administrate the difficult sync between those two project files (e.g. real.csproj and real.CI.csproj).
I could use T4 templating for generating both files but this way I would loose easy file adding from the Visual Studio.

I’m searching for the patters/ideas how to solve this issue.

Please sign in to leave a comment.