In the case of Visual Studio, the .sln files are associated with the Microsoft Visual Studio Version Selector, which is installed on my computer under "C: \ Program Files \ Common Files \ microsoft shared \ MSEnv \ VSLauncher.exe"
This executable should analyze the solution file to determine the version, and then present the icon on the right in Explorer.
In general, file associations for a given file type are present in the registry under HKEY_CLASSES_ROOT .
But in your case, I think you just need to read the contents of the file to determine which one it is. I hope there is something easily distinguishable between them.
source share