Windows will often have multiple versions of .Net framework installed. It is possible to find the installed versions through “Turn features on and off” dialog or by searching the key database under “HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP”.
In order to select a particular version to use for a specific
application, which say has name app.exe, create a file
app.exe.config with contents:
<configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> </startup> </configuration>
Version string can be changed as required.
Once the program is started the very useful Windows Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) can be used to check which .Net assemblies the application actually loaded.