Sunday, December 11, 2011

"Building Multiple TargetFramework Version Libraries" - One code base, multiple targeted .Net Versions, lots of lessons learned...

MSDN Code Gallery - Building Multiple TargetFramework Version Libraries

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

...

image..."

The number of lessons learned covered in the article makes it a great resource if you need to target different .Net Framework versions...

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...