Have a question related to backwards compatibility. I always thought that the backwards compatibility was in regards to if I compiled something on a lower .net Version, thus not needing to install that prior version if I have a superior version already installed in order to be able to run it on a client machine.
But apparently this also applies to compiling a project in .net 4.8 and running it on a System where .net 4.8 isn't installed. For example, I used a Windows 7 SP1 VM where only .net 4 Client Profile is installed. To test this out I created a small WPF application that has two Buttons.
Button #1 is async and is calling an async function, something that's not supported in .net 4
Button #2 is something completely simple, just calling a MessageBox, nothing special.
My VM can run the .net 4.8 compiled .exe just fine, the two Buttons appear, Button #2 outputs my MessageBox, and it only gives an exception if I run whatever I implemented in Button #1, which would require .net 4.8 (PresentationCore TypeLoad Exception).
I wasn't aware that this was possible, I always thought that it would give an error that .NET 4.8 is not installed if I tried to run something compiled on that version.
TL;DR - Is there documentation somewhere in MSDN or a Blog Post from the .NET Devs that confirms it being normal behavior the possibility of running applications compiled on a newer .net Version that's not installed on the Client OS?