Short form: What's the simplest way to tell from a program if .NET 2.0 SP1
has been installed on the current machine?
Background: A unit test I wrote to verify that MTOM is being handled
correctly, which uses a WCF service, fails on some machines, because the
service's WSDL isn't being advertised correctly. Attempts to read its WSDL
reuslt in a 500 "Internal Service Error." Turning on tracing reveals that
the problem is an inablity to load the class System.DateTimeOffset, which
was indeed introduced in SP1. (Why it's needed I'm not sure; the stack
trace isn't very helpful, but it looks like part of initializing WCF's
"WsdlExporter"). This dependency of .NET 3.0 on .NET 2.0 SP1 doesn't seem
to be documented or enforced.
I'd like to write an ANT task that will install SP1 if it's not already
installed. Installing it is simple enough, but I don't know how to do the
check. Something like "see if this file exists" would be ideal.