-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win7 OSArchitecture crash workaround #808
Conversation
@@ -493,6 +495,16 @@ private IServerListener CreateServiceListener(MessageProtocolType protocol, Edit | |||
} | |||
} | |||
|
|||
private static string GetOSArchitecture() | |||
{ | |||
if (IntPtr.Size == 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will tell you the architecture of the current process, so this could be a x86 process running on a x64 OS.
Does Environment.Is64BitOperatingSystem
work for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a much better way
…e in win7 on .NET Framework
4494bb4
to
e627ad6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we could still use RuntimeInformation to check the OS... But I respect using this package as little as possible on win7.
Win7 EOL Jan 2020!!
This doesn't work yet. Looking into it |
Ok, I've fixed my foolishness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Avoids calling the System.Runtime.InteropServices.RuntimeInformation API that crashes in Win7.
See PowerShell/vscode-powershell#1633.