redStorm said:
How can I make my C# app run against .NET 3.5 SP1? I know that using
<supportedRuntime>V3.5</supportedRuntime> will target 3.5 but (I assume) not
SP1.
<supportedRuntime> doesn't actually work that way, because the 3.5 framework
uses the 2.0 runtime. You can only specify *runtimes* that way, not
*frameworks*, and the element only expresses preference, not demand.
If you actually try this on a system where 3.5 isn't installed, you should
see that the application will run anyway if you don't use any 3.5
assemblies. You can also try "V4.0" or "V42.0" and it will all work. That's
because the framework will fall back to the latest version it does know
about if it can't match the version string with an installed runtime. In
short, this is pretty much useless.
Detecting a specific service pack is possible, but it's slightly more
involved. See
http://stackoverflow.com/questions/...work-versions-and-service-packs-are-installed