Progress on building
I've really been getting up to speed on using MSBuild and think I have a very nice base set of build scripts. I basically took the scripts from Carel Lotz's series and created a nice set of common build tasks for building and unit testing projects, and have done it in a way so that I can easily override paths or override the build progress. For instance, since we already have continuous integration on CS, I just have it build CS (it doesn't do tests or code analysis) and copy all the DLLs and any reference DLLs into a kind of "latest good build" location. Then I currently have the News Gateway add-on setup so that when it goes to build, it will first copy the DLLs from the latest good build of CS, and then it goes through the News Gateway project files and remaps all its external references to its latest DLLs of CS, and then it gets built, tested, and periodically analyses.
So far, I have created two custom build tasks for MSBuild. First, I created one called GetProjectReferences, which basically returns the file location of all external references for a given set of project files. This is used so I can copy both the compiled output of a project and all of its references to a common folder, so that any other projects that reference it can get all of the dependent files very easily.
Second, I've created a task called UpdateProjectReferences that lets you remap all of the external references in a set of project files to a certain directory. In the CS Subversion repository, we already have a set file structure and it works pretty well for development purposes. For the add-ons, the inter dependencies between the projects can become chaotic. Often, the add-ons build against the output in the latest CS Web\bin folder, since it provides an easy way to link to the latest project output without having to check compiled project assemblies into Subversion (since we previously did that when we used Vault and it wasn't the best) and it also avoids project references, since those can get hairy. But this can be a problem when it downloads News Gateway to build, as it just gets News Gateway, not it and CS. So what it does is it updates the references to a local set that it knows are valid, recent, and good to compile against.
I'll probably end up looking into contributing some of these tasks back to the MSBuild Community Tasks project.