“We don’t get a chance to do that many things, and every one should be really excellent. Because this is our life.” - Steve Jobs

Method not found: ‘Boolean System.Threading.WaitHandle.WaitOne(System.TimeSpan)’

The above exception came up quite unexpectedly at a customer yesterday. WTF? This method certainly exists on my machine, and every other machine we tested on up until now? How can a core .NET function not exist?

It turns out, that there are some overloads to WaitOne that were only introduced in SP1 of .NET 3.5. If you don’t have SP1, you don’t have the overloads. Luckily, SP1 was a requirement already, so it was just a matter of installing it. But I would not have expected something like that from a service pack release. Nasty!!!

References:

Watch out for those WaitOne() overloads (when you need backwards …
WaitHandle.WaitOne Method (Int32) (System.Threading)

Tags: , Categories: Programming
Trackback URL for this post: https://tomotvos.ca/programming/waitone-not-found/trackback/

Comments are closed on this post.

   
Copyright © 2010-2015 Tom Otvos. All rights reserved.