How can I detect when the .NET framework is "turned off"?
- by John Myczek
My application requires the .NET Framework version 3.5. I recently ran into a customer that had the .NET Framework installed but turned off.
In this case, my installer (InstallShield 2009) does not prompt the user to install the Framework (because it is already installed) and when my application runs it crashes immediately. I tried another .NET application and it also crashes immediately.
Is there any way to detect this situation and handle it more gracefully? Just detecting this during install is not ideal since the .NET Framework can be turned off at any time. Ideally, the application would be able to check and display a friendly message to the user telling them they need to turn on the .NET Framework.