I have a .NET 2.0 application that has recently had contributions that are Service Pack 1 dependent. The deployment project has detected .NET 2.0 as a prerequisite, but NOT SP1. How do I include SP1 as a dependency/prerequisite in my deployment project?

+3  A: 

You'll want to setup launch condition in your deployment project to make sure version 2.0 SP1 is installed. You'll want to set a requirement based off the MsiNetAssemblySupport variable, tied to the version number of .NET 2.0 SP1 (2.0.50727.1433 and above according to this page.)

Bootstrapping the project to actually download the framework if it isn't installed is a different matter, and there are plenty of articles out there on how to do that.

I'm afraid this isn't very helpful. The first thing he says after he lists the framework versions is, "Please note that it is definitely not reliable to use the file versions in the above table to detect the installed service pack level." He links to another of his posts that explains his preferred way of checking, but the link to his sample code is broken.