"Building Multiple TargetFramework Version Libraries" - One code base, multiple targeted .Net Versions, lots of lessons learned...
Imagine you want to create a library that supports different versions of .NET. Of course there are multiple ways to do this but this is the technique that I have adopted for my CodePlex projects.
My Requirements Are
- Build for .NET 4.0.0, .NET 4.0.1 and in the future .NET 4.5
- Have one set of source files for all releases
- Works well with MSBuild keeping each version separate in obj and bin folders
- Works well with tools like Resharper, StyleCop etc.
- Handles version specific app.config / web.config files
- Target framework and build configuration are easy to see in Windows Explorer file properties with debug builds
The number of lessons learned covered in the article makes it a great resource if you need to target different .Net Framework versions...