What is the painless/maintainable way of using MSBuild as your build runner ? (Forgive the length of this post)
I was just trying my hand at TeamCity (which I must s
I didn't try TeamCity yet but did set up a Build environment for our new BizTalk project.
Following the excellent advice of Sayed Ibrahim Hashimi on my own question before starting out, I created a set of MSBuild .proj and .targets scripts.
The Core
A central .targets script for the actual build steps you want to perform:
$(ValidateDependsOn);
Validate;
$(PullDependsOn);
PullFromVersionControl;
$(BuildDependsOn);
Build;
The second core part are the configuration targets like you find them in your .csproj files
Foo
Bar
The Projects
The single .csproj itself is represented by a.targets file with just a collection of ItemGroups you need for building.
Putting it together
The .proj you are actually going to execute with MSBuild will import your Configuration, your Project (source code files) and the Core (Pull, Build and Deployment commands)
Using this approach I was able to reuse the .targets containing the sources to build my some 50 projects in many different combinations instead of creating VS solutions to group them.
I hope you'll find this useful - I can add more details if you're interested.