The system cannot find the file specified. (2147942402, 80070002)

After updating the TFS 2010 client from Beta2 to RC on my SharePoint development machine I found that I couldn’t control IIS using IISRESET, with a message usually of the following format…

Attempting stop…

Stop attempt failed.

The system cannot find the file specified. (214794202, 80070002)

As anyone who does SharePoint development knows, not being able to restart IIS periodically is a bit of a annoyance and I didn’t want to keep going into IIS Manager to do this.

Turns out this is a problem with uninstalling Microsoft .NET 4.0 Beta 2 and the solution is to repair the Microsoft .NET Framework 4 Client Profile.