diff --git a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
index d225629ecc44..3b69250ac3b5 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 35fdf380afda..88c55c53d9c1 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 48ac0a4c76fe..c9cfc2a036f6 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 23e220518717..d30964ce49d1 100644
--- a/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs
+++ b/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs
@@ -45,7 +45,6 @@ public ProfileCmdltsTests() : base()
AzureSession.DataStore = dataStore;
commandRuntimeMock = new MockCommandRuntime();
SetMockData();
- AzureSession.Profile = new AzureProfile();
}
[Fact]
@@ -89,7 +88,7 @@ public void ClearAzureProfileClearsCustomProfile()
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.Force = new SwitchParameter(true);
- cmdlt.SubscriptionDataFile = subscriptionDataFile;
+ cmdlt.Profile = new AzureProfile(subscriptionDataFile);
// Act
cmdlt.InvokeBeginProcessing();
@@ -507,7 +506,6 @@ public void SelectAzureSubscriptionByNameUpdatesProfile()
cmdlt.CommandRuntime = commandRuntimeMock;
cmdlt.SetParameterSet("SelectSubscriptionByNameParameterSet");
cmdlt.SubscriptionName = azureSubscription2.Name;
- Assert.NotEqual(azureSubscription2.Id, AzureSession.Profile.CurrentContext.Subscription.Id);
// Act
cmdlt.InvokeBeginProcessing();
@@ -637,7 +635,6 @@ public void SelectAzureSubscriptionByInvalidGuidThrowsException()
cmdlt.SetParameterSet("SelectSubscriptionByIdParameterSet");
string invalidGuid = "foo";
cmdlt.SubscriptionId = invalidGuid;
- Assert.Null(AzureSession.Profile.CurrentContext.Subscription);
// Act
cmdlt.InvokeBeginProcessing();
diff --git a/src/Common/Commands.Common.Test/packages.config b/src/Common/Commands.Common.Test/packages.config
index 2707ae71c417..2d596df8d274 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 646ae316570f..95dfbc0ef8c5 100644
--- a/src/Common/Commands.Common/AzurePSCmdlet.cs
+++ b/src/Common/Commands.Common/AzurePSCmdlet.cs
@@ -25,7 +25,10 @@ namespace Microsoft.WindowsAzure.Commands.Utilities.Common
{
public abstract class AzurePSCmdlet : PSCmdlet
{
- private readonly RecordingTracingInterceptor httpTracingInterceptor = new RecordingTracingInterceptor();
+ private readonly RecordingTracingInterceptor _httpTracingInterceptor = new RecordingTracingInterceptor();
+
+ [Parameter(Mandatory = false, HelpMessage = "In-memory profile.")]
+ public AzureProfile Profile { get; set; }
static AzurePSCmdlet()
{
@@ -37,25 +40,73 @@ static AzurePSCmdlet()
AzureSession.ClientFactory.UserAgents.Add(AzurePowerShell.UserAgentValue);
}
- public AzurePSCmdlet()
+ ///
+ /// Cmdlet begin process. Write to logs, setup Http Tracing and initialize profile
+ ///
+ protected override void BeginProcessing()
+ {
+ InitializeProfile();
+
+ if (string.IsNullOrEmpty(ParameterSetName))
+ {
+ WriteDebugWithTimestamp(string.Format(Resources.BeginProcessingWithoutParameterSetLog, this.GetType().Name));
+ }
+ else
+ {
+ WriteDebugWithTimestamp(string.Format(Resources.BeginProcessingWithParameterSetLog, this.GetType().Name, ParameterSetName));
+ }
+
+ if (CurrentContext != null && CurrentContext.Account != null && CurrentContext.Account.Id != null)
+ {
+ WriteDebugWithTimestamp(string.Format("using account id '{0}'...", CurrentContext.Account.Id));
+ }
+
+ RecordingTracingInterceptor.AddToContext(_httpTracingInterceptor);
+
+ base.BeginProcessing();
+ }
+
+ private void InitializeProfile()
{
- AzureSession.Profile = new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile));
+ // Load profile from disk
+ var profileFromDisk = new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile));
+ if (AzureSession.Profile == null ||
+ AzureSession.Profile.ProfilePath == profileFromDisk.ProfilePath)
+ {
+ AzureSession.Profile = profileFromDisk;
+ }
- DefaultProfileClient = new ProfileClient(AzureSession.Profile);
+ // If profile parameter is not specified, use one from session
+ if (Profile == null)
+ {
+ Profile = AzureSession.Profile;
+ }
+ }
+
+ ///
+ /// End processing. Flush messages in tracing interceptor and save profile.
+ ///
+ protected override void EndProcessing()
+ {
+ string message = string.Format(Resources.EndProcessingLog, this.GetType().Name);
+ WriteDebugWithTimestamp(message);
+
+ RecordingTracingInterceptor.RemoveFromContext(_httpTracingInterceptor);
+ FlushMessagesFromTracingInterceptor();
+
+ base.EndProcessing();
}
public AzureContext CurrentContext
{
- get { return AzureSession.Profile.CurrentContext; }
+ get { return Profile.CurrentContext; }
}
public bool HasCurrentSubscription
{
- get { return AzureSession.Profile.CurrentContext.Subscription != null; }
+ get { return Profile.CurrentContext.Subscription != null; }
}
- public ProfileClient DefaultProfileClient { get; private set; }
-
protected string CurrentPath()
{
// SessionState is only available within Powershell so default to
@@ -192,53 +243,15 @@ protected override void ProcessRecord()
}
}
- ///
- /// Cmdlet begin process
- ///
- protected override void BeginProcessing()
- {
- if (string.IsNullOrEmpty(ParameterSetName))
- {
- WriteDebugWithTimestamp(string.Format(Resources.BeginProcessingWithoutParameterSetLog, this.GetType().Name));
- }
- else
- {
- WriteDebugWithTimestamp(string.Format(Resources.BeginProcessingWithParameterSetLog, this.GetType().Name, ParameterSetName));
- }
-
- if (CurrentContext != null && CurrentContext.Account != null && CurrentContext.Account.Id != null)
- {
- WriteDebugWithTimestamp(string.Format("using account id '{0}'...", CurrentContext.Account.Id));
- }
-
- RecordingTracingInterceptor.AddToContext(httpTracingInterceptor);
-
- base.BeginProcessing();
- }
-
private void FlushMessagesFromTracingInterceptor()
{
string message;
- while (httpTracingInterceptor.MessageQueue.TryDequeue(out message))
+ while (_httpTracingInterceptor.MessageQueue.TryDequeue(out message))
{
base.WriteDebug(message);
}
}
- ///
- /// End processing
- ///
- protected override void EndProcessing()
- {
- string message = string.Format(Resources.EndProcessingLog, this.GetType().Name);
- WriteDebugWithTimestamp(message);
-
- RecordingTracingInterceptor.RemoveFromContext(httpTracingInterceptor);
- FlushMessagesFromTracingInterceptor();
-
- base.EndProcessing();
- }
-
///
/// Asks for confirmation before executing the action.
///
diff --git a/src/Common/Commands.Common/CloudBaseCmdlet.cs b/src/Common/Commands.Common/CloudBaseCmdlet.cs
index 73da454a508c..bf9c110ae210 100644
--- a/src/Common/Commands.Common/CloudBaseCmdlet.cs
+++ b/src/Common/Commands.Common/CloudBaseCmdlet.cs
@@ -128,7 +128,7 @@ protected virtual T CreateChannel()
}
string certificateThumbprint = CurrentContext.Account.Id;
- Debug.Assert(DefaultProfileClient.Profile.Accounts[certificateThumbprint].Type == AzureAccount.AccountType.Certificate);
+ Debug.Assert(Profile.Accounts[certificateThumbprint].Type == AzureAccount.AccountType.Certificate);
return ChannelHelper.CreateServiceManagementChannel(
ServiceBinding,
diff --git a/src/Common/Commands.Common/Commands.Common.csproj b/src/Common/Commands.Common/Commands.Common.csproj
index f39e79594410..20119ccc86eb 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/Common/Commands.Common/SubscriptionCmdletBase.cs b/src/Common/Commands.Common/SubscriptionCmdletBase.cs
index cfb9c0c74ff5..53c8f04ca45b 100644
--- a/src/Common/Commands.Common/SubscriptionCmdletBase.cs
+++ b/src/Common/Commands.Common/SubscriptionCmdletBase.cs
@@ -13,10 +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;
namespace Microsoft.WindowsAzure.Commands.Utilities.Profile
{
@@ -27,39 +24,32 @@ namespace Microsoft.WindowsAzure.Commands.Utilities.Profile
///
public abstract class SubscriptionCmdletBase : AzurePSCmdlet
{
- [Parameter(Mandatory = false, HelpMessage = "[Deprecated]: File storing subscription data, if not set uses default.")]
- public string SubscriptionDataFile { get; set; }
-
private readonly bool _saveProfile;
- protected SubscriptionCmdletBase(bool saveProfile)
+ protected SubscriptionCmdletBase(bool saveProfile)
{
- this._saveProfile = saveProfile;
+ _saveProfile = saveProfile;
}
protected override void BeginProcessing()
{
- if (!string.IsNullOrEmpty(SubscriptionDataFile))
- {
- ProfileClient = new ProfileClient(new AzureProfile(SubscriptionDataFile));
- WriteWarning(Resources.SubscriptionDataFileDeprecated);
- }
- else
- {
- ProfileClient = new ProfileClient(AzureSession.Profile);
- }
+ base.BeginProcessing();
+
+ ProfileClient = new ProfileClient(Profile);
ProfileClient.WarningLog = WriteWarning;
ProfileClient.DebugLog = WriteDebug;
}
-
protected override void EndProcessing()
{
+
if (_saveProfile)
{
- ProfileClient.Profile.Save();
+ Profile.Save();
}
- }
+ base.EndProcessing();
+ }
public ProfileClient ProfileClient { get; set; }
+
}
}
\ No newline at end of file
diff --git a/src/Common/Commands.Common/packages.config b/src/Common/Commands.Common/packages.config
index db144df8abb5..c71cf59068ce 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/Account/AddAzureAccount.cs b/src/Common/Commands.Profile/Account/AddAzureAccount.cs
index db7cc6697a4e..d2efb315a0d1 100644
--- a/src/Common/Commands.Profile/Account/AddAzureAccount.cs
+++ b/src/Common/Commands.Profile/Account/AddAzureAccount.cs
@@ -17,7 +17,6 @@
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.WindowsAzure.Commands.Common.Properties;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Profile;
namespace Microsoft.WindowsAzure.Commands.Profile
diff --git a/src/Common/Commands.Profile/Account/GetAzureAccount.cs b/src/Common/Commands.Profile/Account/GetAzureAccount.cs
index 39044de505f7..d088ebddc317 100644
--- a/src/Common/Commands.Profile/Account/GetAzureAccount.cs
+++ b/src/Common/Commands.Profile/Account/GetAzureAccount.cs
@@ -12,6 +12,7 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using System.Linq;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.Azure.Common.Authentication.Models;
@@ -37,7 +38,7 @@ public GetAzureAccount() : base(false)
public override void ExecuteCmdlet()
{
- IEnumerable accounts = DefaultProfileClient.ListAccounts(Name);
+ IEnumerable accounts = Profile.Accounts.Values.Where(a => Name == null || a.Id == Name);
List output = new List();
foreach (AzureAccount account in accounts) {
output.Add(account.ToPSAzureAccount());
diff --git a/src/Common/Commands.Profile/Commands.Profile.csproj b/src/Common/Commands.Profile/Commands.Profile.csproj
index 253cd39c6a88..751bceb5db3e 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/Subscription/GetAzureSubscription.cs b/src/Common/Commands.Profile/Subscription/GetAzureSubscription.cs
index 522f7a7dd686..00c74f548995 100644
--- a/src/Common/Commands.Profile/Subscription/GetAzureSubscription.cs
+++ b/src/Common/Commands.Profile/Subscription/GetAzureSubscription.cs
@@ -64,7 +64,7 @@ public override void ExecuteCmdlet()
switch (ParameterSetName)
{
case "ByName":
- WriteSubscriptions(ProfileClient.RefreshSubscriptions(AzureSession.Profile.CurrentContext.Environment)
+ WriteSubscriptions(ProfileClient.RefreshSubscriptions(Profile.CurrentContext.Environment)
.Where(s => SubscriptionName == null || s.Name.Equals(SubscriptionName, StringComparison.InvariantCultureIgnoreCase)));
break;
case "ById":
@@ -103,7 +103,7 @@ public void GetCurrent()
// since current is strictly in-memory and we want the real
// current subscription.
//
- if (AzureSession.Profile.CurrentContext.Subscription == null)
+ if (Profile.CurrentContext.Subscription == null)
{
WriteError(new ErrorRecord(
new InvalidOperationException(Resources.InvalidSelectedSubscription),
@@ -112,7 +112,7 @@ public void GetCurrent()
}
else
{
- WriteSubscriptions(AzureSession.Profile.CurrentContext.Subscription);
+ WriteSubscriptions(Profile.CurrentContext.Subscription);
}
}
@@ -148,7 +148,7 @@ private PSAzureSubscription ConstructPsAzureSubscription(AzureSubscription subsc
psObject.DefaultAccount = subscription.Account;
psObject.Accounts = ProfileClient.Profile.Accounts.Values.Where(a => a.HasSubscription(subscription.Id)).ToArray();
psObject.IsDefault = subscription.IsPropertySet(AzureSubscription.Property.Default);
- psObject.IsCurrent = AzureSession.Profile.CurrentContext.Subscription != null && AzureSession.Profile.CurrentContext.Subscription.Id == subscription.Id;
+ psObject.IsCurrent = Profile.CurrentContext.Subscription != null && Profile.CurrentContext.Subscription.Id == subscription.Id;
psObject.CurrentStorageAccountName = subscription.GetProperty(AzureSubscription.Property.StorageAccount);
psObject.TenantId = subscription.GetPropertyAsArray(AzureSubscription.Property.Tenants).FirstOrDefault();
return psObject;
@@ -160,7 +160,7 @@ private PSAzureSubscriptionExtended ConstructPsAzureSubscriptionExtended(AzureSu
{
var response = client.Subscriptions.Get();
var environment = ProfileClient.GetEnvironmentOrDefault(subscription.Environment);
- var account = DefaultProfileClient.Profile.Accounts[subscription.Account];
+ var account = ProfileClient.Profile.Accounts[subscription.Account];
bool isCert = account.Type == AzureAccount.AccountType.Certificate;
PSAzureSubscriptionExtended result = new PSAzureSubscriptionExtended(ConstructPsAzureSubscription(subscription))
diff --git a/src/Common/Commands.Profile/Subscription/ImportAzurePublishSettings.cs b/src/Common/Commands.Profile/Subscription/ImportAzurePublishSettings.cs
index 91e3ab826627..91452191b3e3 100644
--- a/src/Common/Commands.Profile/Subscription/ImportAzurePublishSettings.cs
+++ b/src/Common/Commands.Profile/Subscription/ImportAzurePublishSettings.cs
@@ -54,7 +54,7 @@ public override void ExecuteCmdlet()
}
AzureSubscription defaultSubscription = ProfileClient.Profile.DefaultSubscription;
- Debug.Assert(AzureSession.Profile.CurrentContext != null);
+ Debug.Assert(Profile.CurrentContext != null);
}
private bool IsDirectory()
diff --git a/src/Common/Commands.Profile/Subscription/SetAzureSubscription.cs b/src/Common/Commands.Profile/Subscription/SetAzureSubscription.cs
index 853af3211163..52545c5afa31 100644
--- a/src/Common/Commands.Profile/Subscription/SetAzureSubscription.cs
+++ b/src/Common/Commands.Profile/Subscription/SetAzureSubscription.cs
@@ -16,6 +16,7 @@
using System.Linq;
using System.Management.Automation;
using System.Security.Cryptography.X509Certificates;
+using Microsoft.Azure.Common.Authentication;
using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
using Microsoft.WindowsAzure.Commands.Utilities.Profile;
@@ -106,7 +107,8 @@ public override void ExecuteCmdlet()
AzureEnvironment environment = ProfileClient.GetEnvironment(Environment, ServiceEndpoint, ResourceManagerEndpoint);
if (environment == null)
{
- environment = DefaultProfileClient.GetEnvironment(Environment, ServiceEndpoint, ResourceManagerEndpoint);
+ var profileClient = new ProfileClient(Profile);
+ environment = profileClient.GetEnvironment(Environment, ServiceEndpoint, ResourceManagerEndpoint);
}
if (environment == null)
diff --git a/src/Common/Commands.Profile/packages.config b/src/Common/Commands.Profile/packages.config
index bf0dd9af7051..338b1e6d571b 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 795f9ddda7dc..6b95ac70c8e7 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 d25a5db1bb64..9724c0c8b8da 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 59414c63252d..71f415e4ec1b 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/packages.config b/src/Common/Commands.ScenarioTests.Common/packages.config
index 4f30bbcb364b..9d6013dbf139 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 df49acdc80cd..a57baad8caec 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 dc0aa2e697c8..dfc7f6672b9d 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 960028cff124..68eeb3611f64 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 76068479a94e..22903a03d401 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 2b35393f5620..dce2911555c4 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 1744d861dc3a..3a1b79763960 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 56750a19af96..2cd29491ddb3 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 7d7c0204ee32..462474bfa8ca 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 2e5f4870e2ee..c9819b1731aa 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 50d6de1ea5a8..26d55e52763e 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 fca898d05968..9ea5f1edfd8d 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 78b6276e889f..4e9fb1abc30a 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/Models/KeyVaultCmdletBase.cs b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultCmdletBase.cs
index 5fdf071b4230..96448081f6d5 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultCmdletBase.cs
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Models/KeyVaultCmdletBase.cs
@@ -34,7 +34,7 @@ internal IKeyVaultDataServiceClient DataServiceClient
{
this.dataServiceClient = new KeyVaultDataServiceClient(
AzureSession.AuthenticationFactory,
- AzureSession.Profile.CurrentContext,
+ Profile.CurrentContext,
new HttpClient());
}
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
index bf0dd9af7051..338b1e6d571b 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 4bc08c7feaef..01a68d59024e 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 33e768d20585..c472ebd6634c 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 b866603d0421..eebaf330c532 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 1af98a461687..a8e3a4815043 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 aa257482c2d9..9064e070b050 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 c9afaa91fa43..3c470e9efb2a 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 83d7b7f2264b..0c003541c078 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 0bb307e278d8..53cabb231bbe 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 1649a66e057d..f5d10b4b77fb 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 69b2e5a146af..be591460ebe2 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 a5c8d149d55d..d32515de5121 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 0b3e1a01e3e2..32c5b1b9b83a 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 294fd86c93b6..b24c70f84835 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 837f3cebd76b..b54abc620f53 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 a4be081da17d..9a3a76ebe89c 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 82bb6d81d01b..677fdd38154b 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 c811f907536a..d50a99f2f2ae 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 bf0dd9af7051..338b1e6d571b 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 0d516bd59f53..3032874ebc08 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 9a337de7c28a..36786f1c5fd9 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 46746d127f39..263af0fd8923 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 06c6efdec015..ae53e87396ab 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 db035e1b5182..323eacd24329 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 bf0dd9af7051..338b1e6d571b 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 ec81c7fe5a5b..131cab24aed8 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 64582a651642..37b5a27f952f 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 f20dfc223828..b504c0d15d38 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 2f7b63646102..bdb2a038ef79 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 68bc0426746e..77e68451d2c8 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 9404b9e85272..57e550ddedf2 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 9444abac0edf..69dbb3bef136 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/IaaS/Disks/AddAzureDataDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/AddAzureDataDisk.cs
index 5ee3ac9dd02c..256aca5d0861 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/AddAzureDataDisk.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/AddAzureDataDisk.cs
@@ -166,7 +166,7 @@ protected Collection GetDataDisks()
protected void ValidateParameters()
{
- var currentSubscription = AzureSession.Profile.CurrentContext.Subscription;
+ var currentSubscription = Profile.CurrentContext.Subscription;
if ((currentSubscription == null || currentSubscription.GetProperty(AzureSubscription.Property.StorageAccount) == null) && this.MediaLocation == null && string.Compare(this.ParameterSetName, "CreateNew", StringComparison.OrdinalIgnoreCase) == 0)
{
throw new ArgumentException(Resources.MediaLocationOrDefaultStorageAccountMustBeSpecified);
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs
index e44e441303ac..e33e0568cca1 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs
@@ -179,7 +179,7 @@ protected override void ValidateParameters()
if (string.Equals(this.ParameterSetName, SetCustomScriptExtensionByContainerBlobsParamSetName))
{
this.StorageEndpointSuffix = string.IsNullOrEmpty(this.StorageEndpointSuffix) ?
- AzureSession.Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix) : this.StorageEndpointSuffix;
+ Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix) : this.StorageEndpointSuffix;
var sName = string.IsNullOrEmpty(this.StorageAccountName) ? GetStorageName() : this.StorageAccountName;
var sKey = string.IsNullOrEmpty(this.StorageAccountKey) ? GetStorageKey(sName) : this.StorageAccountKey;
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkSecurityGroupConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkSecurityGroupConfig.cs
index 1c8dbf6a7fb8..5aaf3b4b4e2c 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkSecurityGroupConfig.cs
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkSecurityGroupConfig.cs
@@ -48,7 +48,7 @@ protected override void ProcessRecord()
else
{
- var networkClient = new NetworkClient(AzureSession.Profile.CurrentContext.Subscription, CommandRuntime);
+ var networkClient = new NetworkClient(Profile.CurrentContext.Subscription, CommandRuntime);
INetworkSecurityGroup networkSecurityGroup = networkClient.GetNetworkSecurityGroup(networkSecurityGroupName, Detailed);
WriteObject(networkSecurityGroup, true);
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
index 2f7b63646102..bdb2a038ef79 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 4cd249eba491..00da90467500 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 90d4ec702484..8fd7df569d1b 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 232b2cbaeac4..20239e6ed4c3 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/HDInsight/Commands.HDInsight.Test/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
index 02feb028f4d4..752ca15f83fd 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/Commands.HDInsight.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj
index 207fa409daee..4293f074c93e 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
index e8dbd9804cf0..3e4dc3ea6ae0 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 28202cd4c3f7..69aee122042f 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 9cac8db684e0..0aff06a3316d 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 af1fd6c5a629..93d4ae38ccda 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 0cceeac04233..b3738985afaa 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 cbdcf3d1ee9c..d39a552a5642 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 ecba787f8f19..1f2a1db73b82 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 66c2713122bc..927ad21f72b2 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/NetworkCmdletBase.cs b/src/ServiceManagement/Network/Commands.Network/NetworkCmdletBase.cs
index 24fc41a9e61f..10af8513a1a8 100644
--- a/src/ServiceManagement/Network/Commands.Network/NetworkCmdletBase.cs
+++ b/src/ServiceManagement/Network/Commands.Network/NetworkCmdletBase.cs
@@ -29,7 +29,7 @@ public abstract class NetworkCmdletBase : AzurePSCmdlet
protected AzureSubscription CurrentSubscription
{
- get { return AzureSession.Profile.CurrentContext.Subscription; }
+ get { return Profile.CurrentContext.Subscription; }
}
protected NetworkClient Client
diff --git a/src/ServiceManagement/Network/Commands.Network/packages.config b/src/ServiceManagement/Network/Commands.Network/packages.config
index 61e1a72087a2..117a157cb527 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 8f6e4f20c50b..60b7d1cc2598 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 5b19687606a9..f098f778e66c 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 b9b4c962c73d..04c8c6687679 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/PSRecoveryServicesClient/PSRecoveryServicesClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesClient.cs
index ea4845e69b5b..c29d08deb7a3 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesClient.cs
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesClient.cs
@@ -47,6 +47,11 @@ public partial class PSRecoveryServicesClient
///
public string ClientRequestId { get; set; }
+ ///
+ /// Azure profile
+ ///
+ public AzureProfile Profile { get; set; }
+
///
/// Amount of time to sleep before fetching job details again.
///
@@ -66,20 +71,14 @@ public partial class PSRecoveryServicesClient
///
private RecoveryServicesManagementClient recoveryServicesClient;
- ///
- /// Initializes a new instance of the class.
- ///
- public PSRecoveryServicesClient()
- {
- }
-
///
/// Initializes a new instance of the class with
/// required current subscription.
///
/// Azure Subscription
- public PSRecoveryServicesClient(AzureSubscription azureSubscription)
+ public PSRecoveryServicesClient(AzureSubscription azureSubscription, AzureProfile azureProfile)
{
+ this.Profile = azureProfile;
this.recoveryServicesClient =
AzureSession.ClientFactory.CreateClient(azureSubscription, AzureEnvironment.Endpoint.ServiceManagement);
}
@@ -240,7 +239,9 @@ private SiteRecoveryManagementClient GetSiteRecoveryClient()
}
SiteRecoveryManagementClient siteRecoveryClient =
- AzureSession.ClientFactory.CreateCustomClient(asrVaultCreds.CloudServiceName, asrVaultCreds.ResourceName, recoveryServicesClient.Credentials, AzureSession.Profile.CurrentContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement));
+ AzureSession.ClientFactory.CreateCustomClient(asrVaultCreds.CloudServiceName,
+ asrVaultCreds.ResourceName, recoveryServicesClient.Credentials,
+ Profile.CurrentContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement));
if (null == siteRecoveryClient)
{
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs
index 9f1707436869..4bf68373de9a 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs
@@ -48,7 +48,7 @@ internal PSRecoveryServicesClient RecoveryServicesClient
{
if (this.recoveryServicesClient == null)
{
- this.recoveryServicesClient = new PSRecoveryServicesClient(CurrentContext.Subscription);
+ this.recoveryServicesClient = new PSRecoveryServicesClient(CurrentContext.Subscription, Profile);
}
return this.recoveryServicesClient;
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config
index 2db9b10fdfba..ced831ec85d4 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 f6700e6a47f1..a3eeb393ab2d 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/packages.config b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
index ca22069d8a6c..c4f217298ed4 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/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
index 4e9c80fb4f10..e0bea9d54701 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 1a32b1f1bfc5..6af0b09e62d7 100644
--- a/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs
@@ -40,7 +40,7 @@ public AddAzureEnvironmentTests()
public void Cleanup()
{
- AzureSession.Profile = new AzureProfile();
+ AzureSession.Profile = null;
}
[Fact]
diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs
index 8475f8338712..e12b7a18af40 100644
--- a/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs
@@ -40,7 +40,7 @@ public RemoveAzureEnvironmentTests()
public void Cleanup()
{
- AzureSession.Profile = new AzureProfile();
+ AzureSession.Profile = null;
}
[Fact]
diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs
index af430eed55b3..74a776208b92 100644
--- a/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs
@@ -42,7 +42,7 @@ public SetAzureEnvironmentTests()
public void Cleanup()
{
- AzureSession.Profile = new AzureProfile();
+ AzureSession.Profile = null;
}
[Fact]
diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteTests.cs
index 165274dda7f9..6a11652e08a5 100644
--- a/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteTests.cs
+++ b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteTests.cs
@@ -144,8 +144,6 @@ public void ProcessGetWebsiteWithNullSubscription()
{
CommandRuntime = new MockCommandRuntime()
};
- AzureSession.Profile = new AzureProfile();
-
Testing.AssertThrows(getAzureWebsiteCommand.ExecuteCmdlet, Resources.InvalidDefaultSubscription);
}
diff --git a/src/ServiceManagement/Services/Commands.Test/packages.config b/src/ServiceManagement/Services/Commands.Test/packages.config
index f9b92e396b8f..a2e68169c97e 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 c1d4a7cd11f8..8ac76e0765f1 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/packages.config b/src/ServiceManagement/Services/Commands.Utilities/packages.config
index 6e6da83c6288..bddd19e8226d 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 6f0e04b89a90..85404bba6b58 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/Websites/ShowAzurePortal.cs b/src/ServiceManagement/Services/Commands/Websites/ShowAzurePortal.cs
index 14c341f5f621..09299552f6c4 100644
--- a/src/ServiceManagement/Services/Commands/Websites/ShowAzurePortal.cs
+++ b/src/ServiceManagement/Services/Commands/Websites/ShowAzurePortal.cs
@@ -57,11 +57,11 @@ public override void ExecuteCmdlet()
AzureEnvironment environment;
if (string.IsNullOrEmpty(Environment))
{
- environment = AzureSession.Profile.CurrentContext.Environment;
+ environment = Profile.CurrentContext.Environment;
}
else
{
- environment = DefaultProfileClient.Profile.Environments[Environment];
+ environment = Profile.Environments[Environment];
}
string managementPortalUrl = environment.GetManagementPortalUrlWithRealm(Realm);
diff --git a/src/ServiceManagement/Services/Commands/packages.config b/src/ServiceManagement/Services/Commands/packages.config
index aa0ce34ed040..73fdefda574e 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 17a09b7c80f7..0053ebbe77d4 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 51c4c0f153f0..484e725b392d 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs
@@ -210,8 +210,6 @@ public static void SetupCertificates()
}
};
client.SetSubscriptionAsDefault(newGuid, "test");
- AzureSession.Profile = client.Profile;
-
client.Profile.Save();
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config
index d5d73d52c57e..7ed9559ab4d4 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 604e3b20940c..1e15f88cc3bc 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/GetAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabase.cs
index 2b1c49a3d524..19ebd2e135b2 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabase.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabase.cs
@@ -136,7 +136,7 @@ public override void ExecuteCmdlet()
break;
case ByServerName:
- context = ServerDataServiceCertAuth.Create(this.ServerName, AzureSession.Profile.CurrentContext.Subscription);
+ context = ServerDataServiceCertAuth.Create(this.ServerName, Profile.CurrentContext.Subscription);
break;
default:
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseCopy.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseCopy.cs
index 30735cba962f..d0c15c92d939 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseCopy.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseCopy.cs
@@ -118,7 +118,7 @@ public override void ExecuteCmdlet()
// Use the provided ServerDataServiceContext or create one from the
// provided ServerName and the active subscription.
IServerDataServiceContext context = ServerDataServiceCertAuth.Create(this.ServerName,
- AzureSession.Profile.CurrentContext.Subscription);
+ Profile.CurrentContext.Subscription);
try
{
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs
index 453bcbfeaa17..0266194bce0f 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs
@@ -174,7 +174,7 @@ public override void ExecuteCmdlet()
var status = this.GetAzureSqlDatabaseImportExportStatusProcess(
serverName,
- serverName + AzureSession.Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix),
+ serverName + Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix),
userName,
password,
requestId);
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseOperation.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseOperation.cs
index c6fc1d5df18b..0a1a40a59a3e 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseOperation.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseOperation.cs
@@ -111,7 +111,7 @@ public override void ExecuteCmdlet()
break;
case ByServerName:
- context = ServerDataServiceCertAuth.Create(this.ServerName, AzureSession.Profile.CurrentContext.Subscription);
+ context = ServerDataServiceCertAuth.Create(this.ServerName, Profile.CurrentContext.Subscription);
break;
}
ProcessWithContext(context);
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseServiceObjective.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseServiceObjective.cs
index cc3a72454ca5..f24988af058d 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseServiceObjective.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseServiceObjective.cs
@@ -98,7 +98,7 @@ public override void ExecuteCmdlet()
break;
case ByServerName:
- context = ServerDataServiceCertAuth.Create(this.ServerName, AzureSession.Profile.CurrentContext.Subscription);
+ context = ServerDataServiceCertAuth.Create(this.ServerName, Profile.CurrentContext.Subscription);
break;
default:
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs
index 994c27a7ebba..0574514b6eed 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs
@@ -171,7 +171,7 @@ private void ProcessWithServerName(int? maxSizeGb, long? maxSizeBytes)
try
{
// Get the current subscription data.
- AzureSubscription subscription = AzureSession.Profile.CurrentContext.Subscription;
+ AzureSubscription subscription = Profile.CurrentContext.Subscription;
// Create a temporary context
ServerDataServiceCertAuth context =
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs
index 18f51d223a14..bb7d236d8766 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs
@@ -152,7 +152,7 @@ private AzureSubscription CurrentSubscription
{
if (string.IsNullOrEmpty(SubscriptionName))
{
- return AzureSession.Profile.CurrentContext.Subscription;
+ return Profile.CurrentContext.Subscription;
}
ProfileClient client = new ProfileClient(new AzureProfile(Path.Combine(AzureSession.ProfileDirectory, AzureSession.ProfileFile)));
@@ -312,7 +312,7 @@ private Uri GetManageUrl(string parameterSetName)
// and append the azure database DNS suffix.
return new Uri(
Uri.UriSchemeHttps + Uri.SchemeDelimiter +
- this.ServerName + AzureSession.Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix));
+ this.ServerName + Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix));
case FullyQualifiedServerNameWithSqlAuthParamSet:
case FullyQualifiedServerNameWithCertAuthParamSet:
// The fully qualified server name was specified,
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs
index a591d44da49d..8933b76e5839 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs
@@ -201,7 +201,7 @@ private void ProcessWithServerName(string databaseName)
try
{
// Get the current subscription data.
- AzureSubscription subscription = AzureSession.Profile.CurrentContext.Subscription;
+ AzureSubscription subscription = Profile.CurrentContext.Subscription;
// Create a temporary context
ServerDataServiceCertAuth context =
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs
index e282d454fd92..39f8a2915449 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs
@@ -280,7 +280,7 @@ private void ProcessWithServerName(string databaseName, int? maxSizeGb, long? ma
try
{
// Get the current subscription data.
- AzureSubscription subscription = AzureSession.Profile.CurrentContext.Subscription;
+ AzureSubscription subscription = Profile.CurrentContext.Subscription;
// Create a temporary context
ServerDataServiceCertAuth context =
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseCopy.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseCopy.cs
index 23dadc019a5b..352fb49c5412 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseCopy.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseCopy.cs
@@ -188,7 +188,7 @@ public override void ExecuteCmdlet()
// Use the provided ServerDataServiceContext or create one from the
// provided ServerName and the active subscription.
IServerDataServiceContext context = ServerDataServiceCertAuth.Create(this.ServerName,
- AzureSession.Profile.CurrentContext.Subscription);
+ Profile.CurrentContext.Subscription);
try
{
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs
index c28cfe6302cf..124a662fbc46 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs
@@ -210,7 +210,7 @@ public override void ExecuteCmdlet()
// Retrieve the fully qualified server name
string fullyQualifiedServerName =
- this.SqlConnectionContext.ServerName + AzureSession.Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix);
+ this.SqlConnectionContext.ServerName + Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix);
// Issue the request
ImportExportRequest context = this.ExportSqlAzureDatabaseProcess(
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs
index bd51e1e8a7c3..19217f708b19 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs
@@ -233,7 +233,7 @@ public override void ExecuteCmdlet()
// Retrieve the fully qualified server name
string fullyQualifiedServerName =
- this.SqlConnectionContext.ServerName + AzureSession.Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix);
+ this.SqlConnectionContext.ServerName + Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix);
// Issue the request
ImportExportRequest context = this.ImportSqlAzureDatabaseProcess(
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRestore.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRestore.cs
index d5d5f9e8a1c5..e9b21f7e8b04 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRestore.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRestore.cs
@@ -199,7 +199,7 @@ public override void ExecuteCmdlet()
{
string serverName = this.SourceServerName ?? connectionContext.ServerName;
- connectionContext = ServerDataServiceCertAuth.Create(serverName, AzureSession.Profile.CurrentContext.Subscription);
+ connectionContext = ServerDataServiceCertAuth.Create(serverName, Profile.CurrentContext.Subscription);
}
string clientRequestId = connectionContext.ClientRequestId;
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StopAzureSqlDatabaseCopy.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StopAzureSqlDatabaseCopy.cs
index 88ffcc275dd7..50a32571e69c 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StopAzureSqlDatabaseCopy.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StopAzureSqlDatabaseCopy.cs
@@ -132,7 +132,7 @@ public override void ExecuteCmdlet()
// Use the provided ServerDataServiceContext or create one from the
// provided ServerName and the active subscription.
IServerDataServiceContext context = ServerDataServiceCertAuth.Create(this.ServerName,
- AzureSession.Profile.CurrentContext.Subscription);
+ Profile.CurrentContext.Subscription);
DatabaseCopyModel databaseCopy;
if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseCopy"))
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/SqlDatabaseCmdletBase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/SqlDatabaseCmdletBase.cs
index 673b5a3e3660..336df4df23a8 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/SqlDatabaseCmdletBase.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/SqlDatabaseCmdletBase.cs
@@ -61,7 +61,7 @@ public static string GenerateClientTracingId()
protected SqlManagementClient GetCurrentSqlClient()
{
// Get the SQL management client for the current subscription
- AzureSubscription subscription = AzureSession.Profile.CurrentContext.Subscription;
+ AzureSubscription subscription = Profile.CurrentContext.Subscription;
SqlDatabaseCmdletBase.ValidateSubscription(subscription);
SqlManagementClient client = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement);
client.HttpClient.DefaultRequestHeaders.Add(Constants.ClientSessionIdHeaderName, clientSessionId);
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config
index cb3d2ca2ca78..a7bb2e078e59 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 39ace81b853e..062079f1cc78 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 e71d93d6a048..44b6fbeb4ded 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 f7e2ca3491ea..9a03835662a6 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/ServiceClients/StorSimpleClient.cs b/src/ServiceManagement/StorSimple/Commands.StorSimple/ServiceClients/StorSimpleClient.cs
index 83618d5751a4..e8ed7626b3fb 100644
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple/ServiceClients/StorSimpleClient.cs
+++ b/src/ServiceManagement/StorSimple/Commands.StorSimple/ServiceClients/StorSimpleClient.cs
@@ -40,11 +40,18 @@ public partial class StorSimpleClient
private CacheItemPolicy ResourceCachetimeoutPolicy = new CacheItemPolicy();
- public StorSimpleClient(AzureSubscription currentSubscription)
+ ///
+ /// Azure profile
+ ///
+ public AzureProfile Profile { get; set; }
+
+ public StorSimpleClient(AzureSubscription currentSubscription, AzureProfile azureProfile)
{
// Temp code to be able to test internal env.
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };//IgnoreCertificateErrorHandler;//delegate { return true; };
-
+
+ this.Profile = azureProfile;
+
this.cloudServicesClient = AzureSession.ClientFactory.CreateClient(currentSubscription, AzureEnvironment.Endpoint.ServiceManagement);
ResourceCachetimeoutPolicy.AbsoluteExpiration = DateTimeOffset.Now.AddHours(1.0d);
@@ -63,7 +70,7 @@ private StorSimpleManagementClient GetStorSimpleClient()
StorSimpleContext.ResourceName, StorSimpleContext.ResourceId,
StorSimpleContext.ResourceProviderNameSpace, StorSimpleContext.StampId,
this.cloudServicesClient.Credentials,
- AzureSession.Profile.CurrentContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement));
+ Profile.CurrentContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement));
if (storSimpleClient == null)
{
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple/StorSimpleCmdletBase.cs b/src/ServiceManagement/StorSimple/Commands.StorSimple/StorSimpleCmdletBase.cs
index b3d99c159e60..8fd0c246ad77 100644
--- a/src/ServiceManagement/StorSimple/Commands.StorSimple/StorSimpleCmdletBase.cs
+++ b/src/ServiceManagement/StorSimple/Commands.StorSimple/StorSimpleCmdletBase.cs
@@ -55,7 +55,7 @@ internal StorSimpleClient StorSimpleClient
{
if (this.storSimpleClient == null)
{
- this.storSimpleClient = new StorSimpleClient(CurrentContext.Subscription);
+ this.storSimpleClient = new StorSimpleClient(CurrentContext.Subscription, Profile);
}
storSimpleClient.ClientRequestId = Guid.NewGuid().ToString("D") + "_PS";
WriteVerbose(string.Format(Resources.ClientRequestIdMessage, storSimpleClient.ClientRequestId));
diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple/packages.config b/src/ServiceManagement/StorSimple/Commands.StorSimple/packages.config
index 44ef561d0beb..d2b17c0207d5 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 d27e0571dab8..9b179ba6cf0c 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 35ab063bad06..892844020767 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 7abcb2302b12..57a4f08429d1 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
False
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs
index e8fe21106612..bb88d466e1ad 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs
@@ -344,13 +344,14 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
if (string.IsNullOrEmpty(azureEnvironmentName))
{
- azureEnvironment = AzureSession.Profile.CurrentContext.Environment;
+ azureEnvironment = Profile.CurrentContext.Environment;
}
else
{
try
{
- azureEnvironment = DefaultProfileClient.GetEnvironmentOrDefault(azureEnvironmentName);
+ var profileClient = new ProfileClient(Profile);
+ azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName);
}
catch (ArgumentException e)
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/packages.config b/src/ServiceManagement/Storage/Commands.Storage/packages.config
index 35ab063bad06..892844020767 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 4cf87f076eca..692f364108b3 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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 e58259eb252c..c388658651c2 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 e0bfb030b291..9032da0e636b 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.4-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll
+ ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.5-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/TestAzureTrafficManagerDomainName.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/TestAzureTrafficManagerDomainName.cs
index fc652d83e066..fe5a664a654a 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/TestAzureTrafficManagerDomainName.cs
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/TestAzureTrafficManagerDomainName.cs
@@ -36,8 +36,8 @@ public override void ExecuteCmdlet()
private string GetDomainNameToCheck(string domainName)
{
- string TrafficManagerSuffix = !string.IsNullOrEmpty(AzureSession.Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix)) ?
- AzureSession.Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix) :
+ string TrafficManagerSuffix = !string.IsNullOrEmpty(Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix)) ?
+ Profile.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix) :
AzureEnvironmentConstants.AzureTrafficManagerDnsSuffix;
if (!string.IsNullOrEmpty(domainName) && !domainName.ToLower().EndsWith(TrafficManagerSuffix))
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
index 98a2269e824e..9667c97a8042 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
@@ -3,7 +3,7 @@
-
+