Skip to content

Commit 451d256

Browse files
author
Hovsep
committed
Merge pull request #587 from waynekuo/dev
AzureRT PR S51 - Updating Start/Stop Emulator related cmdlets to work with latest .NET release
2 parents 1719993 + 6409710 commit 451d256

File tree

8 files changed

+1459
-2121
lines changed

8 files changed

+1459
-2121
lines changed

src/Common/Commands.Common/Properties/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Common/Commands.Common/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ use and privacy statement at <url> and (c) agree to sharing my contact inf
11651165
<value>Cannot find storage account '{0}' please type the name of an existing storage account.</value>
11661166
</data>
11671167
<data name="StorageEmulatorExe" xml:space="preserve">
1168-
<value>WAStorageEmulator.exe</value>
1168+
<value>AzureStorageEmulator.exe</value>
11691169
</data>
11701170
<data name="StorageEmulatorInstallPathRegistryKeyValue" xml:space="preserve">
11711171
<value>InstallPath</value>

src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureSdkVersionInfo.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ internal class AzureSdkVersionInfo
1818
{
1919
//When intergrate with new Azure SDK, please update the versions here.
2020
//If you find there are other version strings to update, please move them to here.
21-
public const string SupportAzureSdkVersionRegKey = "v2.5";
22-
public const string SupportAzureSdkVersion = "2.5.0";
21+
public const string DefaultAzureSdkVersionRegKey = "v2.7";
2322
}
2423
}

src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools
2424
{
2525
public class AzureTool
2626
{
27-
public const string SupportAzureSdkVersion = "2.5.0";
27+
public const string SupportAzureSdkVersion = "2.7.0";
2828

2929
public static void Validate()
3030
{
@@ -94,13 +94,11 @@ private static string GetSdkVersionRegistryValue()
9494
{
9595
throw new InvalidOperationException(Resources.AzureToolsNotInstalledMessage);
9696
}
97-
version = key.GetSubKeyNames().FirstOrDefault(n => n == AzureSdkVersionInfo.SupportAzureSdkVersionRegKey);
9897

99-
if (string.IsNullOrEmpty(version) && key.GetSubKeyNames().Length > 0)
100-
{
101-
throw new InvalidOperationException(string.Format(Resources.AzureSdkVersionNotSupported, AzureSdkVersionInfo.SupportAzureSdkVersionRegKey));
102-
}
103-
else if (string.IsNullOrEmpty(version) && key.GetSubKeyNames().Length == 0)
98+
// select the latest version of SDK installed on the machine.
99+
version = key.GetSubKeyNames().LastOrDefault();
100+
101+
if (string.IsNullOrWhiteSpace(version) && key.GetSubKeyNames().Length == 0)
104102
{
105103
throw new InvalidOperationException(Resources.AzureToolsNotInstalledMessage);
106104
}
@@ -110,7 +108,7 @@ private static string GetSdkVersionRegistryValue()
110108
{
111109
if (IgnoreMissingSDKError)
112110
{
113-
version = AzureSdkVersionInfo.SupportAzureSdkVersionRegKey;
111+
version = AzureSdkVersionInfo.DefaultAzureSdkVersionRegKey;
114112
}
115113
else
116114
{

0 commit comments

Comments
 (0)