diff --git a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
index b4cf2c5b4746..d225629ecc44 100644
--- a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
+++ b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
@@ -58,7 +58,7 @@
False
- ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/Common/Commands.Common.Storage/packages.config b/src/Common/Commands.Common.Storage/packages.config
index 52134a14e9f3..35fdf380afda 100644
--- a/src/Common/Commands.Common.Storage/packages.config
+++ b/src/Common/Commands.Common.Storage/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
index c0be90a19b4d..48ac0a4c76fe 100644
--- a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
+++ b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
@@ -56,7 +56,7 @@
False
- ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs b/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs
index 36e5908e9a5d..23e220518717 100644
--- a/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs
+++ b/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs
@@ -53,7 +53,7 @@ public void ClearAzureProfileClearsDefaultProfile()
{
ClearAzureProfileCommand cmdlt = new ClearAzureProfileCommand();
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetAccount(azureAccount);
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetSubscription(azureSubscription1);
@@ -68,7 +68,7 @@ public void ClearAzureProfileClearsDefaultProfile()
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
Assert.Equal(0, client.Profile.Subscriptions.Count);
Assert.Equal(0, client.Profile.Accounts.Count);
Assert.Equal(2, client.Profile.Environments.Count); //only default environments
@@ -81,7 +81,7 @@ public void ClearAzureProfileClearsCustomProfile()
ClearAzureProfileCommand cmdlt = new ClearAzureProfileCommand();
// Setup
- ProfileClient client = new ProfileClient(subscriptionDataFile);
+ ProfileClient client = new ProfileClient(new AzureProfile(subscriptionDataFile));
client.AddOrSetAccount(azureAccount);
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetSubscription(azureSubscription1);
@@ -97,7 +97,7 @@ public void ClearAzureProfileClearsCustomProfile()
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient(subscriptionDataFile);
+ client = new ProfileClient(new AzureProfile(subscriptionDataFile));
Assert.Equal(0, client.Profile.Subscriptions.Count);
Assert.Equal(0, client.Profile.Accounts.Count);
Assert.Equal(2, client.Profile.Environments.Count); //only default environments
@@ -177,7 +177,7 @@ public void SetAzureSubscriptionAddsSubscriptionWithCertificate()
cmdlt.InvokeEndProcessing();
// Verify
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)];
var newAccount = client.Profile.Accounts[SampleCertificate.Thumbprint];
Assert.Equal(cmdlt.SubscriptionName, newSubscription.Name);
@@ -193,11 +193,11 @@ public void SetAzureSubscriptionAddsSubscriptionWithCertificate()
[Fact]
public void SetAzureSubscriptionDerivesEnvironmentFromEnvironmentParameterOnAdd()
{
- SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetEnvironment(azureEnvironment);
client.Profile.Save();
+ SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SubscriptionId = Guid.NewGuid().ToString();
@@ -212,7 +212,7 @@ public void SetAzureSubscriptionDerivesEnvironmentFromEnvironmentParameterOnAdd(
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)];
Assert.Equal(cmdlt.SubscriptionName, newSubscription.Name);
Assert.Equal(cmdlt.Environment, newSubscription.Environment);
@@ -224,7 +224,7 @@ public void SetAzureSubscriptionThrowsExceptionWithoutCertificateOnAdd()
{
SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetEnvironment(azureEnvironment);
client.Profile.Save();
@@ -242,13 +242,13 @@ public void SetAzureSubscriptionThrowsExceptionWithoutCertificateOnAdd()
[Fact]
public void SetAzureSubscriptionDerivesEnvironmentFromEnvironmentParameterOnSet()
{
- SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetAccount(azureAccount);
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetSubscription(azureSubscription1);
client.Profile.Save();
+ SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SubscriptionId = azureSubscription1.Id.ToString();
@@ -261,7 +261,7 @@ public void SetAzureSubscriptionDerivesEnvironmentFromEnvironmentParameterOnSet(
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)];
Assert.Equal(cmdlt.Environment, newSubscription.Environment);
Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount));
@@ -270,13 +270,13 @@ public void SetAzureSubscriptionDerivesEnvironmentFromEnvironmentParameterOnSet(
[Fact]
public void SetAzureSubscriptionDerivesEnvironmentFromServiceEndpointParameterOnSet()
{
- SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetAccount(azureAccount);
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetSubscription(azureSubscription1);
client.Profile.Save();
+ SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SubscriptionId = azureSubscription1.Id.ToString();
@@ -289,7 +289,7 @@ public void SetAzureSubscriptionDerivesEnvironmentFromServiceEndpointParameterOn
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)];
Assert.Equal(cmdlt.Environment, newSubscription.Environment);
Assert.Equal(cmdlt.CurrentStorageAccountName,
@@ -299,13 +299,13 @@ public void SetAzureSubscriptionDerivesEnvironmentFromServiceEndpointParameterOn
[Fact]
public void SetAzureSubscriptionDerivesEnvironmentFromResourcesEndpointParameterOnSet()
{
- SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetAccount(azureAccount);
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetSubscription(azureSubscription1);
client.Profile.Save();
+ SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SubscriptionId = azureSubscription1.Id.ToString();
@@ -318,7 +318,7 @@ public void SetAzureSubscriptionDerivesEnvironmentFromResourcesEndpointParameter
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)];
Assert.Equal(cmdlt.Environment, newSubscription.Environment);
Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount));
@@ -327,14 +327,15 @@ public void SetAzureSubscriptionDerivesEnvironmentFromResourcesEndpointParameter
[Fact]
public void SetAzureSubscriptionDerivesEnvironmentFromBothEndpointParameters()
{
- SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetAccount(azureAccount);
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetSubscription(azureSubscription1);
client.Profile.Save();
+ SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
+
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SubscriptionId = azureSubscription1.Id.ToString();
cmdlt.CurrentStorageAccountName = "NewCloudStorage";
@@ -347,7 +348,7 @@ public void SetAzureSubscriptionDerivesEnvironmentFromBothEndpointParameters()
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)];
Assert.Equal(cmdlt.Environment, newSubscription.Environment);
Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount));
@@ -356,15 +357,15 @@ public void SetAzureSubscriptionDerivesEnvironmentFromBothEndpointParameters()
[Fact]
public void SetAzureSubscriptionUpdatesSubscriptionWithCertificate()
{
- SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
-
// Setup
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetAccount(azureAccount);
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetSubscription(azureSubscription1);
client.Profile.Save();
+ SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand();
+
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SubscriptionId = azureSubscription1.Id.ToString();
cmdlt.CurrentStorageAccountName = "NewCloudStorage";
@@ -376,7 +377,7 @@ public void SetAzureSubscriptionUpdatesSubscriptionWithCertificate()
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)];
var newAccount = client.Profile.Accounts[SampleCertificate.Thumbprint];
var existingAccount = client.Profile.Accounts[azureAccount.Id];
@@ -401,14 +402,14 @@ public void ImportPublishSettingsFileSelectsCorrectEnvironment()
// Setup
AzureSession.DataStore.WriteFile("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings",
Properties.Resources.ValidProfileChina);
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var oldDataStore = FileUtilities.DataStore;
FileUtilities.DataStore = AzureSession.DataStore;
var expectedEnv = "AzureChinaCloud";
var expected = client.ImportPublishSettings("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings", null);
cmdlt.CommandRuntime = commandRuntimeMock;
- cmdlt.ProfileClient = new ProfileClient();
+ cmdlt.ProfileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
cmdlt.PublishSettingsFile = "ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings";
try
@@ -440,14 +441,14 @@ public void ImportPublishSettingsFileOverwritesEnvironment()
// Setup
AzureSession.DataStore.WriteFile("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings",
Properties.Resources.ValidProfileChina);
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var oldDataStore = FileUtilities.DataStore;
FileUtilities.DataStore = AzureSession.DataStore;
var expectedEnv = "AzureCloud";
var expected = client.ImportPublishSettings("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings", expectedEnv);
cmdlt.CommandRuntime = commandRuntimeMock;
- cmdlt.ProfileClient = new ProfileClient();
+ cmdlt.ProfileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
cmdlt.PublishSettingsFile = "ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings";
cmdlt.Environment = expectedEnv;
@@ -475,8 +476,8 @@ public void ImportPublishSettingsFileOverwritesEnvironment()
[Fact]
public void SelectDefaultAzureSubscriptionByNameUpdatesProfile()
{
- SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
var client = SetupDefaultProfile();
+ SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
// Setup
cmdlt.CommandRuntime = commandRuntimeMock;
@@ -491,7 +492,7 @@ public void SelectDefaultAzureSubscriptionByNameUpdatesProfile()
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
Assert.NotNull(client.Profile.DefaultSubscription);
Assert.Equal(azureSubscription2.Id, client.Profile.DefaultSubscription.Id);
}
@@ -499,14 +500,14 @@ public void SelectDefaultAzureSubscriptionByNameUpdatesProfile()
[Fact]
public void SelectAzureSubscriptionByNameUpdatesProfile()
{
- SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
SetupDefaultProfile();
+ SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
// Setup
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SetParameterSet("SelectSubscriptionByNameParameterSet");
cmdlt.SubscriptionName = azureSubscription2.Name;
- Assert.Null(AzureSession.Profile.CurrentContext.Subscription);
+ Assert.NotEqual(azureSubscription2.Id, AzureSession.Profile.CurrentContext.Subscription.Id);
// Act
cmdlt.InvokeBeginProcessing();
@@ -521,14 +522,13 @@ public void SelectAzureSubscriptionByNameUpdatesProfile()
[Fact]
public void SelectAzureSubscriptionWithoutPassthroughDoesNotPrint()
{
- SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
SetupDefaultProfile();
+ SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
// Setup
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SetParameterSet("SelectSubscriptionByNameParameterSet");
cmdlt.SubscriptionName = azureSubscription2.Name;
- Assert.Null(AzureSession.Profile.CurrentContext.Subscription);
// Act
cmdlt.InvokeBeginProcessing();
@@ -542,15 +542,14 @@ public void SelectAzureSubscriptionWithoutPassthroughDoesNotPrint()
[Fact]
public void SelectAzureSubscriptionWithPassthroughPrintsSubscription()
{
- SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
SetupDefaultProfile();
+ SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
// Setup
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SetParameterSet("SelectSubscriptionByNameParameterSet");
cmdlt.SubscriptionName = azureSubscription2.Name;
cmdlt.PassThru = new SwitchParameter(true);
- Assert.Null(AzureSession.Profile.CurrentContext.Subscription);
// Act
cmdlt.InvokeBeginProcessing();
@@ -565,8 +564,8 @@ public void SelectAzureSubscriptionWithPassthroughPrintsSubscription()
[Fact]
public void SelectDefaultAzureSubscriptionByIdAndNoDefaultUpdatesProfile()
{
- SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
var client = SetupDefaultProfile();
+ SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
// Setup
cmdlt.CommandRuntime = commandRuntimeMock;
@@ -581,7 +580,7 @@ public void SelectDefaultAzureSubscriptionByIdAndNoDefaultUpdatesProfile()
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
Assert.NotNull(client.Profile.DefaultSubscription);
Assert.Equal(azureSubscription2.Id, client.Profile.DefaultSubscription.Id);
@@ -598,59 +597,21 @@ public void SelectDefaultAzureSubscriptionByIdAndNoDefaultUpdatesProfile()
cmdlt.InvokeEndProcessing();
// Verify
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
Assert.Null(client.Profile.DefaultSubscription);
}
- [Fact]
- public void SelectAzureSubscriptionByIdAndNoCurrentUpdatesProfile()
- {
- SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
- SetupDefaultProfile();
-
- // Setup
- cmdlt.CommandRuntime = commandRuntimeMock;
- cmdlt.SetParameterSet("SelectSubscriptionByIdParameterSet");
- cmdlt.SubscriptionId = azureSubscription2.Id.ToString();
- Assert.Null(AzureSession.Profile.CurrentContext.Subscription);
-
- // Act
- cmdlt.InvokeBeginProcessing();
- cmdlt.ExecuteCmdlet();
- cmdlt.InvokeEndProcessing();
-
- // Verify
- Assert.NotNull(AzureSession.Profile.CurrentContext.Subscription);
- Assert.Equal(azureSubscription2.Id, AzureSession.Profile.CurrentContext.Subscription.Id);
-
- cmdlt = new SelectAzureSubscriptionCommand();
-
- // Setup
- cmdlt.CommandRuntime = commandRuntimeMock;
- cmdlt.SetParameterSet("NoCurrentSubscriptionParameterSet");
- cmdlt.NoCurrent = new SwitchParameter(true);
-
- // Act
- cmdlt.InvokeBeginProcessing();
- cmdlt.ExecuteCmdlet();
- cmdlt.InvokeEndProcessing();
-
- // Verify
- Assert.Null(AzureSession.Profile.CurrentContext.Subscription);
- }
-
[Fact]
public void SelectAzureSubscriptionByInvalidIdThrowsException()
{
- SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
SetupDefaultProfile();
+ SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand();
// Setup
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SetParameterSet("SelectSubscriptionByIdParameterSet");
string invalidGuid = Guid.NewGuid().ToString();
cmdlt.SubscriptionId = invalidGuid;
- Assert.Null(AzureSession.Profile.CurrentContext.Subscription);
// Act
cmdlt.InvokeBeginProcessing();
@@ -661,7 +622,7 @@ public void SelectAzureSubscriptionByInvalidIdThrowsException()
}
catch (ArgumentException ex)
{
- Assert.Contains(string.Format(Microsoft.WindowsAzure.Commands.Common.Properties.Resources.InvalidSubscriptionId, invalidGuid), ex.Message);
+ Assert.Contains(string.Format("The subscription id {0} doesn't exist.\r\nParameter name: id", invalidGuid), ex.Message);
}
}
@@ -693,7 +654,7 @@ public void SelectAzureSubscriptionByInvalidGuidThrowsException()
private ProfileClient SetupDefaultProfile()
{
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetEnvironment(azureEnvironment);
client.AddOrSetAccount(azureAccount);
client.AddOrSetSubscription(azureSubscription1);
diff --git a/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs b/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs
index 1c9f38eeda95..c56e5d1f4de6 100644
--- a/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs
+++ b/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs
@@ -26,6 +26,7 @@
using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.Azure.Common.Authentication;
using Microsoft.Azure;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks
{
@@ -57,7 +58,7 @@ public TClient CreateClient(AzureSubscription subscription, AzureEnviro
SubscriptionCloudCredentials creds = new TokenCloudCredentials(subscription.Id.ToString(), "fake_token");
if (HttpMockServer.GetCurrentMode() != HttpRecorderMode.Playback)
{
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureContext context = new AzureContext(
subscription,
profileClient.GetAccount(subscription.Account),
@@ -67,7 +68,7 @@ public TClient CreateClient(AzureSubscription subscription, AzureEnviro
creds = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context);
}
- Uri endpointUri = (new ProfileClient()).Profile.Environments[subscription.Environment].GetEndpointAsUri(endpoint);
+ Uri endpointUri = (new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)))).Profile.Environments[subscription.Environment].GetEndpointAsUri(endpoint);
return CreateCustomClient(creds, endpointUri);
}
diff --git a/src/Common/Commands.Common.Test/packages.config b/src/Common/Commands.Common.Test/packages.config
index cc4d3898b9c7..2707ae71c417 100644
--- a/src/Common/Commands.Common.Test/packages.config
+++ b/src/Common/Commands.Common.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/Common/Commands.Common/AzurePSCmdlet.cs b/src/Common/Commands.Common/AzurePSCmdlet.cs
index 1ece6a6fcd0c..646ae316570f 100644
--- a/src/Common/Commands.Common/AzurePSCmdlet.cs
+++ b/src/Common/Commands.Common/AzurePSCmdlet.cs
@@ -29,9 +29,6 @@ public abstract class AzurePSCmdlet : PSCmdlet
static AzurePSCmdlet()
{
- AzureSession.Profile = new AzureProfile(
- Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile));
-
if (!TestMockSupport.RunningMocked)
{
AzureSession.ClientFactory.AddAction(new RPRegistrationAction());
@@ -42,6 +39,8 @@ static AzurePSCmdlet()
public AzurePSCmdlet()
{
+ AzureSession.Profile = new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile));
+
DefaultProfileClient = new ProfileClient(AzureSession.Profile);
}
diff --git a/src/Common/Commands.Common/Commands.Common.csproj b/src/Common/Commands.Common/Commands.Common.csproj
index 78ee7d0de2f4..f39e79594410 100644
--- a/src/Common/Commands.Common/Commands.Common.csproj
+++ b/src/Common/Commands.Common/Commands.Common.csproj
@@ -60,7 +60,7 @@
False
- ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/Common/Commands.Common/GeneralUtilities.cs b/src/Common/Commands.Common/GeneralUtilities.cs
index 91d16ea35e4f..787b18fe10a5 100644
--- a/src/Common/Commands.Common/GeneralUtilities.cs
+++ b/src/Common/Commands.Common/GeneralUtilities.cs
@@ -14,7 +14,6 @@
using Hyak.Common;
using Microsoft.Azure.Common.Authentication;
-using Microsoft.Azure.Common.Authentication.Properties;
using Microsoft.WindowsAzure.Commands.Common;
using System;
using System.Collections.Generic;
@@ -52,7 +51,9 @@ private static bool TryFindCertificatesInStore(string thumbprint,
public static string GetNodeModulesPath()
{
- return Path.Combine(FileUtilities.GetAssemblyDirectory(), Resources.NodeModulesPath);
+ return Path.Combine(
+ FileUtilities.GetAssemblyDirectory(),
+ Microsoft.WindowsAzure.Commands.Common.Properties.Resources.NodeModulesPath);
}
[PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
@@ -72,7 +73,9 @@ public static X509Certificate2 GetCertificateFromStore(string thumbprint)
}
else
{
- throw new ArgumentException(string.Format(Resources.CertificateNotFoundInStore, thumbprint));
+ throw new ArgumentException(string.Format(
+ Microsoft.Azure.Common.Authentication.Properties.Resources.CertificateNotFoundInStore,
+ thumbprint));
}
}
diff --git a/src/Common/Commands.Common/SubscriptionCmdletBase.cs b/src/Common/Commands.Common/SubscriptionCmdletBase.cs
index 78724e571738..cfb9c0c74ff5 100644
--- a/src/Common/Commands.Common/SubscriptionCmdletBase.cs
+++ b/src/Common/Commands.Common/SubscriptionCmdletBase.cs
@@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------
using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.WindowsAzure.Commands.Common.Properties;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using System.Management.Automation;
@@ -40,12 +41,12 @@ protected override void BeginProcessing()
{
if (!string.IsNullOrEmpty(SubscriptionDataFile))
{
- ProfileClient = new ProfileClient(SubscriptionDataFile);
+ ProfileClient = new ProfileClient(new AzureProfile(SubscriptionDataFile));
WriteWarning(Resources.SubscriptionDataFileDeprecated);
}
else
{
- ProfileClient = new ProfileClient();
+ ProfileClient = new ProfileClient(AzureSession.Profile);
}
ProfileClient.WarningLog = WriteWarning;
ProfileClient.DebugLog = WriteDebug;
diff --git a/src/Common/Commands.Common/packages.config b/src/Common/Commands.Common/packages.config
index 3213cd9fd1e1..db144df8abb5 100644
--- a/src/Common/Commands.Common/packages.config
+++ b/src/Common/Commands.Common/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/Common/Commands.Profile/Commands.Profile.csproj b/src/Common/Commands.Profile/Commands.Profile.csproj
index 607af65564e7..253cd39c6a88 100644
--- a/src/Common/Commands.Profile/Commands.Profile.csproj
+++ b/src/Common/Commands.Profile/Commands.Profile.csproj
@@ -55,7 +55,7 @@
False
- ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/Common/Commands.Profile/packages.config b/src/Common/Commands.Profile/packages.config
index 8ee5a3bea881..bf0dd9af7051 100644
--- a/src/Common/Commands.Profile/packages.config
+++ b/src/Common/Commands.Profile/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
index 7b7d64d51eae..795f9ddda7dc 100644
--- a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
+++ b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
@@ -46,7 +46,7 @@
False
- ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/Common/Commands.ScenarioTest/packages.config b/src/Common/Commands.ScenarioTest/packages.config
index 4693432a86d4..d25a5db1bb64 100644
--- a/src/Common/Commands.ScenarioTest/packages.config
+++ b/src/Common/Commands.ScenarioTest/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
index 5d3c8255a4a7..59414c63252d 100644
--- a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
+++ b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
@@ -45,7 +45,7 @@
False
- ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs
index dad5dc607273..3999a573e91c 100644
--- a/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs
+++ b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs
@@ -26,6 +26,7 @@
using Microsoft.Azure.Test;
using Microsoft.Azure.Test.HttpRecorder;
using Microsoft.Azure;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.ScenarioTest
{
@@ -41,7 +42,7 @@ public class EnvironmentSetupHelper
public EnvironmentSetupHelper()
{
AzureSession.DataStore = new MockDataStore();
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
// Ignore SSL errors
System.Net.ServicePointManager.ServerCertificateValidationCallback += (se, cert, chain, sslerror) => true;
diff --git a/src/Common/Commands.ScenarioTests.Common/packages.config b/src/Common/Commands.ScenarioTests.Common/packages.config
index 5bc385c29e1c..4f30bbcb364b 100644
--- a/src/Common/Commands.ScenarioTests.Common/packages.config
+++ b/src/Common/Commands.ScenarioTests.Common/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
index 7a3d064577b2..df49acdc80cd 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -46,7 +46,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/packages.config b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
index fa77f6a7811f..dc0aa2e697c8 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
index 63a1a68f471d..960028cff124 100644
--- a/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
+++ b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
@@ -49,7 +49,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Batch/Commands.Batch/packages.config b/src/ResourceManager/Batch/Commands.Batch/packages.config
index 8989889a8717..76068479a94e 100644
--- a/src/ResourceManager/Batch/Commands.Batch/packages.config
+++ b/src/ResourceManager/Batch/Commands.Batch/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
index ac9aba11f4e4..2b35393f5620 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
@@ -49,7 +49,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
index 3c1518859eb2..1744d861dc3a 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
index fc55723884a7..56750a19af96 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
@@ -56,7 +56,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
index ffbffb33eb54..7d7c0204ee32 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj b/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
index d5438ef9d57b..2e5f4870e2ee 100644
--- a/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
+++ b/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
@@ -57,7 +57,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
index 2ebff082a914..50d6de1ea5a8 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
@@ -56,7 +56,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
index 5394b05a0ca8..fca898d05968 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
index 194f9207ac7e..78b6276e889f 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
@@ -115,7 +115,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
index 8ee5a3bea881..bf0dd9af7051 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
index ef8a52134224..4bc08c7feaef 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
@@ -49,7 +49,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
index ba6e47c68c76..33e768d20585 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
index 674bd6e1dd73..b866603d0421 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
@@ -54,7 +54,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
index 3c070dd7a58e..1af98a461687 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
index 06380eb25ea6..aa257482c2d9 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
@@ -51,7 +51,7 @@
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
index d6cbfdbdadcc..c9afaa91fa43 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
index 7a1378d3e2b0..83d7b7f2264b 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
@@ -56,7 +56,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Resources/Commands.Resources/packages.config b/src/ResourceManager/Resources/Commands.Resources/packages.config
index 5ab6811cc001..0bb307e278d8 100644
--- a/src/ResourceManager/Resources/Commands.Resources/packages.config
+++ b/src/ResourceManager/Resources/Commands.Resources/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
index 55556133374b..1649a66e057d 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
@@ -49,7 +49,7 @@
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
index 12546370cbcb..69b2e5a146af 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
index 4f102e6e0302..a5c8d149d55d 100644
--- a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
@@ -97,7 +97,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/ResourceManager/Sql/Commands.Sql/packages.config b/src/ResourceManager/Sql/Commands.Sql/packages.config
index a1f39893a99e..0b3e1a01e3e2 100644
--- a/src/ResourceManager/Sql/Commands.Sql/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
index 409a30e3af1f..294fd86c93b6 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
@@ -47,7 +47,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
index f0cd0b2eec8d..837f3cebd76b 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
index 77a700f96362..a4be081da17d 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
@@ -56,7 +56,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
index a02e836c9c32..82bb6d81d01b 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
index af66ce7ce398..c811f907536a 100644
--- a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
+++ b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
@@ -56,7 +56,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ResourceManager/Tags/Commands.Tags/packages.config b/src/ResourceManager/Tags/Commands.Tags/packages.config
index 8ee5a3bea881..bf0dd9af7051 100644
--- a/src/ResourceManager/Tags/Commands.Tags/packages.config
+++ b/src/ResourceManager/Tags/Commands.Tags/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
index 48dc39f966fd..0d516bd59f53 100644
--- a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
+++ b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
@@ -55,7 +55,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
index c081eb1ac23d..9a337de7c28a 100644
--- a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
+++ b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
index fbca92edb634..46746d127f39 100644
--- a/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
+++ b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
@@ -60,7 +60,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Automation/Commands.Automation/packages.config b/src/ServiceManagement/Automation/Commands.Automation/packages.config
index 26493ec3dea1..06c6efdec015 100644
--- a/src/ServiceManagement/Automation/Commands.Automation/packages.config
+++ b/src/ServiceManagement/Automation/Commands.Automation/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj
index bc3f0bd0fd47..db035e1b5182 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj
@@ -45,7 +45,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config
index 8ee5a3bea881..bf0dd9af7051 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
index 3228c54d9940..ec81c7fe5a5b 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
@@ -67,7 +67,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
index c73ed249945e..64582a651642 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
index 2ddac3386aff..f20dfc223828 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
@@ -67,7 +67,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
index 0499fc38439a..2f7b63646102 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
index ee542b7fca61..68bc0426746e 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
@@ -61,7 +61,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
index ebef70f40944..9404b9e85272 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
index d07589b42d6d..9444abac0edf 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
@@ -69,7 +69,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
index 0499fc38439a..2f7b63646102 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
index 0f07fe77c3ac..4cd249eba491 100644
--- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
+++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
@@ -49,7 +49,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
index d7e30a6c84df..90d4ec702484 100644
--- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
+++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
index 920e44a0a6ed..232b2cbaeac4 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
@@ -49,7 +49,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
@@ -224,7 +224,9 @@
-
+
+ Designer
+
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetCommandTests.cs
index 7ececed759f1..bc7c75117961 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetCommandTests.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetCommandTests.cs
@@ -27,6 +27,7 @@
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests
{
@@ -102,7 +103,7 @@ public void CanGetSubscriptionsCertificateCredentialFromCurrentSubscription()
{
var getClustersCommand = new GetAzureHDInsightClusterCommand();
var waSubscription = GetCurrentSubscription();
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var subscriptionCreds = getClustersCommand.GetSubscriptionCredentials(waSubscription, AzureSession.Profile.CurrentContext.Environment, profileClient.Profile);
@@ -121,7 +122,7 @@ public void CanGetAccessTokenCertificateCredentialFromCurrentSubscription()
{
Id = IntegrationTestBase.TestCredentials.SubscriptionId,
};
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
profileClient.Profile.Accounts["test"] = new AzureAccount
{
Id = "test",
@@ -148,7 +149,7 @@ public void CanGetJobSubmissionCertificateCredentialFromCurrentSubscription()
{
var getClustersCommand = new GetAzureHDInsightJobCommand();
var waSubscription = GetCurrentSubscription();
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var subscriptionCreds = getClustersCommand.GetJobSubmissionClientCredentials(
waSubscription,
@@ -172,7 +173,7 @@ public void CanGetJobSubmissionAccessTokenCredentialFromCurrentSubscription()
Id = IntegrationTestBase.TestCredentials.SubscriptionId,
Account = "test"
};
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
profileClient.Profile.Accounts["test"] = new AzureAccount
{
Id = "test",
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulator.cs
index 3880279875d3..3ca423dca8ac 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulator.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulator.cs
@@ -22,6 +22,7 @@
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators
{
@@ -33,7 +34,7 @@ internal AzureHDInsightSubscriptionResolverSimulator()
{
var certificate = new X509Certificate2(Convert.FromBase64String(IntegrationTestBase.TestCredentials.Certificate), string.Empty);
AzureSession.DataStore.AddCertificate(certificate);
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
profileClient.Profile.Accounts[certificate.Thumbprint] = new AzureAccount
{
Id = certificate.Thumbprint,
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestBase.cs
index 19edb8ec3c24..430a7d0a1be2 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestBase.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestBase.cs
@@ -36,6 +36,7 @@
using Microsoft.WindowsAzure.Management.HDInsight.Framework.Core;
using Microsoft.WindowsAzure.Management.HDInsight.Logging;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities
{
@@ -67,22 +68,29 @@ public static IEnumerable GetAllCredentials()
public static AzureSubscription GetCurrentSubscription()
{
string certificateThumbprint1 = "jb245f1d1257fw27dfc402e9ecde37e400g0176r";
- ProfileClient profileClient = new ProfileClient();
+ var newSubscription = new AzureSubscription()
+ {
+ Id = IntegrationTestBase.TestCredentials.SubscriptionId,
+ // Use fake certificate thumbprint
+ Account = certificateThumbprint1,
+ Environment = "AzureCloud"
+ };
+ newSubscription.Properties[AzureSubscription.Property.Default] = "True";
+
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
profileClient.Profile.Accounts[certificateThumbprint1] =
new AzureAccount()
{
Id = certificateThumbprint1,
Type = AzureAccount.AccountType.Certificate
};
-
+ profileClient.Profile.Subscriptions[newSubscription.Id] = newSubscription;
+
profileClient.Profile.Save();
- return new AzureSubscription()
- {
- Id = IntegrationTestBase.TestCredentials.SubscriptionId,
- // Use fake certificate thumbprint
- Account = certificateThumbprint1
- };
+ AzureSession.Profile = profileClient.Profile;
+
+ return profileClient.Profile.Subscriptions[newSubscription.Id];
}
public static AzureTestCredentials GetCredentialsForEnvironmentType(EnvironmentType type)
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
index b3d9f74d6972..02feb028f4d4 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs
index 03977c8d19cb..589397c83336 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs
@@ -25,6 +25,7 @@
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation;
using Microsoft.WindowsAzure.Management.HDInsight.Logging;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets
{
@@ -118,7 +119,7 @@ protected AzureSubscription GetCurrentSubscription(string Subscription, X509Cert
{
this.WriteWarning("The -Subscription parameter is deprecated, Please use Select-AzureSubscription -Current to select a subscription to use.");
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var subscriptionResolver =
ServiceLocator.Instance.Locate().Create(client.Profile);
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
index d470ca4dec13..207fa409daee 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
@@ -57,7 +57,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/UseAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/UseAzureHDInsightClusterCommand.cs
index c096c35db2be..8b2ba329e843 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/UseAzureHDInsightClusterCommand.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/UseAzureHDInsightClusterCommand.cs
@@ -21,6 +21,8 @@
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions;
using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
+using System.IO;
namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations
{
@@ -34,7 +36,7 @@ public override async Task EndProcessing()
IHDInsightClient client = this.GetClient();
var cluster = await client.GetClusterAsync(this.Name);
var connection = new AzureHDInsightClusterConnection();
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
connection.Credential = this.GetSubscriptionCredentials(this.CurrentSubscription,
profileClient.GetEnvironmentOrDefault(this.CurrentSubscription.Environment),
profileClient.Profile);
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs
index 33e05260a2e6..bbb84dd9b4a4 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs
@@ -18,6 +18,8 @@
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
+using Microsoft.Azure.Common.Authentication.Models;
namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters
{
@@ -41,7 +43,7 @@ internal IHDInsightClient GetClient()
{
this.CurrentSubscription.ArgumentNotNull("CurrentSubscription");
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var subscriptionCredentials = this.GetSubscriptionCredentials(
this.CurrentSubscription,
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandExtensions.cs
index 6c07c4f171ff..dc89b700bd29 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandExtensions.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandExtensions.cs
@@ -20,6 +20,7 @@
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions;
using System;
using System.Diagnostics;
+using System.IO;
using System.Reflection;
namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters
@@ -65,7 +66,7 @@ public static IHDInsightSubscriptionCredentials GetSubscriptionCertificateCreden
public static IHDInsightSubscriptionCredentials GetAccessTokenCredentials(this IAzureHDInsightCommonCommandBase command,
AzureSubscription currentSubscription, AzureAccount azureAccount, AzureEnvironment environment)
{
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureContext azureContext = new AzureContext(currentSubscription, azureAccount, environment);
var cloudCredentials = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(azureContext) as AccessTokenCredential;
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandExecutorBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandExecutorBase.cs
index 809781906fd6..73b104c754f6 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandExecutorBase.cs
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandExecutorBase.cs
@@ -23,6 +23,7 @@
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions;
using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters
{
@@ -48,7 +49,7 @@ internal IJobSubmissionClient GetClient(string cluster)
{
cluster.ArgumentNotNull("ClusterEndpoint");
IJobSubmissionClient client = null;
- ProfileClient profileClient = new ProfileClient();
+ ProfileClient profileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
string currentEnvironmentName = this.CurrentSubscription == null ? null : this.CurrentSubscription.Environment;
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
index 1dd848347762..e8dbd9804cf0 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
index 8d5749f2fb4a..28202cd4c3f7 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
@@ -46,7 +46,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
index 38d77db6957d..9cac8db684e0 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj
index 5806884b347b..af1fd6c5a629 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj
@@ -49,7 +49,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config
index d1e033e143a2..0cceeac04233 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Network/Commands.Network.Test/Commands.Network.Test.csproj b/src/ServiceManagement/Network/Commands.Network.Test/Commands.Network.Test.csproj
index 47aa3e434586..cbdcf3d1ee9c 100644
--- a/src/ServiceManagement/Network/Commands.Network.Test/Commands.Network.Test.csproj
+++ b/src/ServiceManagement/Network/Commands.Network.Test/Commands.Network.Test.csproj
@@ -46,7 +46,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Network/Commands.Network.Test/packages.config b/src/ServiceManagement/Network/Commands.Network.Test/packages.config
index eeffae9b988a..ecba787f8f19 100644
--- a/src/ServiceManagement/Network/Commands.Network.Test/packages.config
+++ b/src/ServiceManagement/Network/Commands.Network.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Network/Commands.Network/Commands.Network.csproj b/src/ServiceManagement/Network/Commands.Network/Commands.Network.csproj
index 892e5a9a1c2d..66c2713122bc 100644
--- a/src/ServiceManagement/Network/Commands.Network/Commands.Network.csproj
+++ b/src/ServiceManagement/Network/Commands.Network/Commands.Network.csproj
@@ -57,7 +57,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Network/Commands.Network/packages.config b/src/ServiceManagement/Network/Commands.Network/packages.config
index 06e3b78b2869..61e1a72087a2 100644
--- a/src/ServiceManagement/Network/Commands.Network/packages.config
+++ b/src/ServiceManagement/Network/Commands.Network/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
index d428a87c3d70..8f6e4f20c50b 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
@@ -44,7 +44,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config
index d7fb750ac29e..5b19687606a9 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
index f424fc40a9a0..b9b4c962c73d 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
@@ -51,7 +51,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config
index 3044a5fc902d..2db9b10fdfba 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
index 333371ed1709..f6700e6a47f1 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
@@ -50,7 +50,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs
index d32c31ca8918..a4a30c0a106e 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.Utilities.CloudService;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common
{
@@ -287,7 +288,7 @@ public string CreateAzureSdkDirectoryAndImportPublishSettings(string publishSett
Debug.Assert(string.IsNullOrEmpty(AzureSdkPath));
AzureSdkPath = CreateDirectory("AzureSdk");
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureSession.DataStore.WriteFile(publishSettingsPath, File.ReadAllText(publishSettingsPath));
client.ImportPublishSettings(publishSettingsPath, null);
client.Profile.Save();
diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
index c79f3c3dea8e..ca22069d8a6c 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/PublishContextTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/PublishContextTests.cs
index 20f6237ed84b..ed5b8acb37a1 100644
--- a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/PublishContextTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/PublishContextTests.cs
@@ -24,6 +24,7 @@
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Properties;
using Microsoft.Azure.Common.Authentication;
+using Microsoft.Azure.Common.Authentication.Models;
namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities
{
@@ -52,7 +53,7 @@ public PublishContextTests()
configPath = service.Paths.CloudConfiguration;
settings = ServiceSettingsTestData.Instance.Data[ServiceSettingsState.Default];
AzureSession.DataStore = new MockDataStore();
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureSession.DataStore.WriteFile(Test.Utilities.Common.Data.ValidPublishSettings.First(),
File.ReadAllText(Test.Utilities.Common.Data.ValidPublishSettings.First()));
client.ImportPublishSettings(Test.Utilities.Common.Data.ValidPublishSettings.First(), null);
diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
index 2048fc3cd555..4e9c80fb4f10 100644
--- a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
+++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
@@ -55,7 +55,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs
index 14af98bff360..1a32b1f1bfc5 100644
--- a/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs
@@ -24,6 +24,7 @@
using Moq;
using Xunit;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Test.Environment
{
@@ -61,7 +62,7 @@ public void AddsAzureEnvironment()
cmdlet.InvokeEndProcessing();
commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once());
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureEnvironment env = client.GetEnvironmentOrDefault("KaTaL");
Assert.Equal(env.Name, cmdlet.Name);
Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], cmdlet.PublishSettingsFileUrl);
@@ -86,7 +87,7 @@ public void AddsEnvironmentWithMinimumInformation()
cmdlet.InvokeEndProcessing();
commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once());
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureEnvironment env = client.Profile.Environments["KaTaL"];
Assert.Equal(env.Name, cmdlet.Name);
Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], cmdlet.PublishSettingsFileUrl);
@@ -108,7 +109,7 @@ public void IgnoresAddingDuplicatedEnvironment()
cmdlet.InvokeBeginProcessing();
cmdlet.ExecuteCmdlet();
cmdlet.InvokeEndProcessing();
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
int count = client.Profile.Environments.Count;
// Add again
@@ -150,7 +151,7 @@ public void AddsEnvironmentWithStorageEndpoint()
cmdlet.InvokeEndProcessing();
commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once());
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureEnvironment env = client.Profile.Environments["KaTaL"];
Assert.Equal(env.Name, cmdlet.Name);
Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], actual.GetVariableValue(AzureEnvironment.Endpoint.PublishSettingsFileUrl.ToString()));
diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs
index 96a134e2fdf9..8475f8338712 100644
--- a/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs
@@ -24,6 +24,7 @@
using Moq;
using Xunit;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Test.Environment
{
@@ -49,7 +50,7 @@ public void RemovesAzureEnvironment()
commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true);
const string name = "test";
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetEnvironment(new AzureEnvironment
{
Name = name
@@ -67,7 +68,7 @@ public void RemovesAzureEnvironment()
cmdlet.ExecuteCmdlet();
cmdlet.InvokeEndProcessing();
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
Assert.False(client.Profile.Environments.ContainsKey(name));
}
diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs
index c5d662e0762d..af430eed55b3 100644
--- a/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs
@@ -25,6 +25,7 @@
using Microsoft.WindowsAzure.Commands.Utilities.Properties;
using Moq;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Test.Environment
{
@@ -49,7 +50,7 @@ public void SetsAzureEnvironment()
{
Mock commandRuntimeMock = new Mock();
string name = "Katal";
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.AddOrSetEnvironment(new AzureEnvironment { Name = name });
SetAzureEnvironmentCommand cmdlet = new SetAzureEnvironmentCommand()
@@ -68,7 +69,7 @@ public void SetsAzureEnvironment()
cmdlet.InvokeEndProcessing();
commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once());
- client = new ProfileClient();
+ client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
AzureEnvironment env = client.Profile.Environments["KaTaL"];
Assert.Equal(env.Name.ToLower(), cmdlet.Name.ToLower());
Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], cmdlet.PublishSettingsFileUrl);
diff --git a/src/ServiceManagement/Services/Commands.Test/Profile/GetAzurePublishSettingsFileTests.cs b/src/ServiceManagement/Services/Commands.Test/Profile/GetAzurePublishSettingsFileTests.cs
index b865f0b63a0c..40f21d06425e 100644
--- a/src/ServiceManagement/Services/Commands.Test/Profile/GetAzurePublishSettingsFileTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Profile/GetAzurePublishSettingsFileTests.cs
@@ -21,6 +21,7 @@
using Moq;
using Microsoft.Azure.Common.Authentication;
using Microsoft.Azure.Common.Authentication.Models;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Test.Profile
{
@@ -40,7 +41,7 @@ public void GetsPublishSettingsFileUrl()
Environment = EnvironmentName.AzureCloud,
Realm = "microsoft.com"
};
- cmdlet.ProfileClient = new ProfileClient();
+ cmdlet.ProfileClient = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
// Test
cmdlet.ExecuteCmdlet();
diff --git a/src/ServiceManagement/Services/Commands.Test/packages.config b/src/ServiceManagement/Services/Commands.Test/packages.config
index 6bf51c052b72..f9b92e396b8f 100644
--- a/src/ServiceManagement/Services/Commands.Test/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
index 8febcd17bb05..c1d4a7cd11f8 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
@@ -64,7 +64,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/PublishContext.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/PublishContext.cs
index a0f1ee2c0cdd..1535a9e71f19 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/Common/PublishContext.cs
+++ b/src/ServiceManagement/Services/Commands.Utilities/Common/PublishContext.cs
@@ -19,6 +19,7 @@
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Common.Authentication;
using Microsoft.WindowsAzure.Commands.Utilities.Properties;
+using Microsoft.Azure.Common.Authentication.Models;
namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService
{
@@ -68,7 +69,7 @@ public PublishContext(
{
try
{
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
SubscriptionId =
client.Profile.Subscriptions.Values.Where(s => s.Name == settings.Subscription)
.Select(s => s.Id.ToString())
diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/Subscription.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/Subscription.cs
index f5417d06f72d..de115746f071 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/Subscription.cs
+++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/Subscription.cs
@@ -20,6 +20,7 @@
using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient
{
@@ -58,7 +59,7 @@ internal Subscription(AzureSubscription azureSubscription)
throw new ArgumentNullException();
}
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
var environment = client.GetEnvironmentOrDefault(azureSubscription.Environment);
this.SubscriptionName = azureSubscription.Name;
diff --git a/src/ServiceManagement/Services/Commands.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Utilities/packages.config
index 295098100097..6e6da83c6288 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Utilities/packages.config
@@ -4,7 +4,7 @@
-
+
diff --git a/src/ServiceManagement/Services/Commands/Commands.csproj b/src/ServiceManagement/Services/Commands/Commands.csproj
index 53bc96f12f01..6f0e04b89a90 100644
--- a/src/ServiceManagement/Services/Commands/Commands.csproj
+++ b/src/ServiceManagement/Services/Commands/Commands.csproj
@@ -62,7 +62,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Services/Commands/packages.config b/src/ServiceManagement/Services/Commands/packages.config
index 561f7f720f57..aa0ce34ed040 100644
--- a/src/ServiceManagement/Services/Commands/packages.config
+++ b/src/ServiceManagement/Services/Commands/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj
index 52ee42244aeb..17a09b7c80f7 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj
@@ -56,7 +56,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs
index ece284ea878a..51c4c0f153f0 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs
@@ -174,7 +174,7 @@ public static void SetupCertificates()
AzureSession.DataStore = new MockDataStore();
AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory();
var newGuid = Guid.NewGuid();
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.Profile.Subscriptions[newGuid] = new AzureSubscription
{
Id = newGuid,
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/UnitTestHelper.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/UnitTestHelper.cs
index cafe590b6aa2..3c83905c1b6c 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/UnitTestHelper.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/UnitTestHelper.cs
@@ -298,7 +298,7 @@ public static AzureSubscription SetupUnitTestSubscription(System.Management.Auto
"clientCertificate",
certificate);
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
client.Profile.Environments[UnitTestEnvironmentName] = new AzureEnvironment
{
Name = UnitTestEnvironmentName,
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config
index 639925966476..d5d73d52c57e 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj
index 393cb5afd294..604e3b20940c 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj
@@ -59,7 +59,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs
index f79043c2976a..18f51d223a14 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs
@@ -24,6 +24,7 @@
using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.Azure.Common.Authentication;
+using System.IO;
namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet
{
@@ -154,7 +155,7 @@ private AzureSubscription CurrentSubscription
return AzureSession.Profile.CurrentContext.Subscription;
}
- ProfileClient client = new ProfileClient();
+ ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
return client.Profile.Subscriptions.Values.First(
s => SubscriptionName == s.Name);
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config
index e561ff5c0963..cb3d2ca2ca78 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj
index e305cc24bac4..39ace81b853e 100644
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj
+++ b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/Commands.StorSimple.Test.csproj
@@ -40,7 +40,7 @@
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config
index c6bb342cca91..e71d93d6a048 100644
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config
+++ b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple/Commands.StorSimple.csproj b/src/ServiceManagement/StorSimple/Commands.StorSimple/Commands.StorSimple.csproj
index b149b73e4271..f7e2ca3491ea 100644
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple/Commands.StorSimple.csproj
+++ b/src/ServiceManagement/StorSimple/Commands.StorSimple/Commands.StorSimple.csproj
@@ -50,7 +50,7 @@
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple/packages.config b/src/ServiceManagement/StorSimple/Commands.StorSimple/packages.config
index e313f29f0dc6..44ef561d0beb 100644
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple/packages.config
+++ b/src/ServiceManagement/StorSimple/Commands.StorSimple/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj b/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj
index 550af457674d..d27e0571dab8 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj
@@ -56,7 +56,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config b/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config
index 25d6269cccaa..35ab063bad06 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
index 457e9fe05480..7abcb2302b12 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
+++ b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
@@ -51,7 +51,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/ServiceManagement/Storage/Commands.Storage/packages.config b/src/ServiceManagement/Storage/Commands.Storage/packages.config
index 25d6269cccaa..35ab063bad06 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/packages.config
+++ b/src/ServiceManagement/Storage/Commands.Storage/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj
index 43dd6e1fe9d6..4cf87f076eca 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj
@@ -43,7 +43,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config
index 2a4bca960d2f..e58259eb252c 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj
index f7931fd3ab55..e0bfb030b291 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj
@@ -53,7 +53,7 @@
False
- ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.2-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.NetFramework.dll
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
index 3ccafa71a1c7..98a2269e824e 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
@@ -3,7 +3,7 @@
-
+