How to use MSBuild to target multiple versions of .NET Framework?
- by McKAMEY
I am improving the builds for an open source project which currently supports .NET Framework v2.0, v3.5, and now v4.0. Up until now, I've restricted myself to v2.0 to ensure compatibility, but with VS2010 I am interested in having real targeted builds.
I'm looking for some guidance on how to edit the MSBuild csproj/soln to be able to cleanly produce builds for each target. I'm willing to have complexity in the csproj and in a batch file to control the build.
My goal is to be able to have a command line script that could produce the builds without needing Visual Studio installed, but only the necessary .NET Framework(s). Ideally, I'd like to minimize dependencies on additional software (e.g. NAnt).
I'm pretty sure this can be done but am having trouble finding a definitive guide on setting it up and best practices.
Bonus: my next step after getting this set up will be to better support Mono Framework. Any help on doing this same thing for Mono would be much appreciated.