because it may fail due to other exceptions before EntryPointNotFoundException occurs, then it will never succeed in Windows. And also, Exception in Windows is very expensive.
Actually this check is fine as long as it's used only to check whether or not the platform is windows. I merged these changes in with some minor modifications.
because it may fail due to other exceptions before EntryPointNotFoundException occurs, then it will never succeed in Windows. And also, Exception in Windows is very expensive.