Here’s the thing. My .NET application crashes with a pretty ugly general exception fault when I try to run it in a machine that doesn’t have .NET framework installed.
Is this normal? If it is… is there any way to check for .NET framework to be able to exit gracefully instead?
You can’t check the version number of the .NET framework with managed code as it can’t execute before loading the .NET runtime. You can use the CLR Unmanaged API to do so, but the best way is to solve this problem is to provide an installation mechanism that checks, downloads and installs .NET Framework if it’s not installed on the machine.