Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/SdkCommon/ClientRuntime/ClientRuntime/ServiceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ private string OsVersion
/// <returns>Value for provided HKLM key</returns>
private string ReadHKLMRegistry(string path, string key)
{
switch (Environment.OSVersion.Platform)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deepak Shankargouda (@dsgouda) let's test this on mono/non-windows to make sure this does not throw runtime exceptions.

{
case PlatformID.Unix:
case PlatformID.MacOSX:
case PlatformID.Xbox:
return string.Empty;
}

try
{
using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(path))
Expand Down