How to use MSBuild to target multiple versions of .NET Framework?
Posted
by McKAMEY
on Stack Overflow
See other posts from Stack Overflow
or by McKAMEY
Published on 2010-05-27T17:02:07Z
Indexed on
2010/05/27
17:21 UTC
Read the original article
Hit count: 308
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.
© Stack Overflow or respective owner