I have a C# application written on Windows 8.1 using Visual Studio Express 2013. So it requires .NET framework 4.5 to run.
Windows 7 systems in my production environment will not have .NET 4.5 on them. Instead just 4.0. Will be installing 4.5 ONLY where this particular application is needed.
If the program attempts to start on a system with no .NET 4.5, it immediately crashes.
I'd like to be able to handle checking if .NET version 4.5 is installed immediately when program starts so I can gracefully inform the end user this cannot run unless 4.5 is installed, and terminate once user presses OK.
Cannot figure out where to place code to check this early enough. I attempted to use the App.Startup event, but it doesn't seem to fire in a Windows 7 .NET 4.5 system at all, only Windows 8 .NET 4.5 which I find really strange!
Any thoughts?