What happens if you run a .NET 4.5 application on a machine that has only .NET 4.0 installed?
Posted: (EET/GMT+2)
Say you've used Visual Studio 2012 to build a WPF application that uses the .NET Framework version 4.5, and you try to run this application on machine that has only .NET 4.0 installed. Will the application run, or will it crash?
Interestingly enough, the answer is: neither. The application doesn't run, but it doesn't crash, either. Instead, you are greeted with a rather simple, but useful message:
MyApplication.exe - .NET Framework Initialization Error To run this application, you must first install one of the following versions of the .NET Framework: .NET Framework, Version=v4.5 Would you like to download and install .NET Framework, Version=v4.5 now?
This message allows you to directly go to a web site designed to let you download the .NET Framework installer for the version your application is using. From there, you can easily download the installer, but also learn more about the update process itself.
For more information, check this document on MSDN.
Happy .NET 4.5 development!