In Windows 7, it is possible to disable the .NET framework via the Control Panel's "Turn Windows features on or off".
If this is done, running a .NET application causes an app crash, which is logged to the Windows Event Log, and also generates an application crash report that is sent back to Microsoft (WER).
How can we avoid this app crash? Because the app requires .NET, I don't think it can perform a check for the framework's presence itself. Providing an application configuration file with "requiredRuntime" specified does not avoid the app crash.
The only solution we can come up with is writing an unmanaged wrapper around every managed application. The unmanaged code could check for the framework being installed, and then launch the managed process. This could be tedious to do for every application.
Ideally, this would just fail more gracefully and let the user know that the .NET framework is required but not available. This solution should probably come from the OS, but we're looking for a way to be able to handle this ourselves for now.
Any ideas appreciated. Thanks, David
View Complete Post