Skip to content

Commit c3220a2

Browse files
Authentication.csproj should not be referenced by module project (#12311)
* Recovery service project should not reference Authentication project directly * update changelog * Update ChangeLog.md * remove project reference to Authentication.csproj from AnalysisServices project * Update ChangeLog.md Co-authored-by: Yabo Hu <[email protected]>
1 parent 81b6b3f commit c3220a2

File tree

8 files changed

+25
-20
lines changed

8 files changed

+25
-20
lines changed
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<PsModuleName>AnalysisServices</PsModuleName>
@@ -10,9 +10,4 @@
1010
<AssemblyName>$(AzAssemblyPrefix)$(PsModuleName).Dataplane</AssemblyName>
1111
<RootNamespace>$(LegacyAssemblyPrefix)$(PsModuleName).Dataplane</RootNamespace>
1212
</PropertyGroup>
13-
14-
<ItemGroup>
15-
<ProjectReference Include="..\..\Accounts\Authentication\Authentication.csproj" />
16-
</ItemGroup>
17-
1813
</Project>

src/AnalysisServices/AnalysisServices.Dataplane/Models/AsAzureDataplaneCmdletBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ internal static AsAzureDataplaneClient CreateAsAzureDataplaneClient(string hostU
134134
{
135135
if (context == null)
136136
{
137-
throw new ArgumentException(Common.Authentication.Properties.Resources.ArmAccountNotFound);
137+
throw new ArgumentException(Resources.ArmAccountNotFound);
138138
}
139139

140140
if (string.IsNullOrEmpty(hostUri))

src/AnalysisServices/AnalysisServices.Dataplane/Properties/Resources.Designer.cs

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

src/AnalysisServices/AnalysisServices.Dataplane/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,7 @@ Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be
164164
<data name="SyncASPollStatusUnknownMessage" xml:space="preserve">
165165
<value>Failed to get the status of the synchronization request for the specified database. ServerName: {0}, RootActivityId: {1}, Date (UTC): {2}, Details: {3}.</value>
166166
</data>
167+
<data name="ArmAccountNotFound" xml:space="preserve">
168+
<value>No account found in the context. Please login using Connect-AzAccount.</value>
169+
</data>
167170
</root>

src/AnalysisServices/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Removed project reference to Authentication
2122

2223
## Version 1.1.3
2324
* Updated assembly version of data plane cmdlets

src/RecoveryServices/RecoveryServices/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Removed project reference to Authentication
2122
* Azure Backup tuned cmdlets help text to be more accurate.
2223
* Azure Backup added support for fetching MAB agent jobs using `Get-AzRecoveryServicesBackupJob` cmdlet.
2324

25+
2426
## Version 2.10.0
2527
* Azure Backup added support for fetching MAB items.
2628
* Azure Site Recovery support to update failover and test failover NIC names, existing NIC reuse.

src/RecoveryServices/RecoveryServices/Common/PSRecoveryServicesClient.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414

1515
using System;
1616
using System.Collections.Generic;
17-
using System.Configuration;
1817
using System.Diagnostics.CodeAnalysis;
1918
using System.Net.Security;
19+
using Microsoft.Azure.Commands.Common.Authentication;
20+
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
2021
using Microsoft.Azure.Management.Internal.Resources;
2122
using Microsoft.Azure.Management.RecoveryServices;
22-
using Microsoft.Azure.Portal.RecoveryServices.Models.Common;
23-
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
24-
using Microsoft.Azure.Common.Authentication;
2523
using Microsoft.Azure.Management.RecoveryServices.Backup;
24+
using Microsoft.Azure.Portal.RecoveryServices.Models.Common;
2625

2726
namespace Microsoft.Azure.Commands.RecoveryServices
2827
{
@@ -114,14 +113,14 @@ public PSRecoveryServicesClient(IAzureContext defaultContext)
114113
}
115114

116115
this.recoveryServicesClient =
117-
AzureSession.ClientFactory.CreateArmClient<RecoveryServicesClient>(
116+
AzureSession.Instance.ClientFactory.CreateArmClient<RecoveryServicesClient>(
118117
defaultContext, AzureEnvironment.Endpoint.ResourceManager);
119118

120119
this.recoveryServicesBackupClient =
121-
AzureSession.ClientFactory.CreateArmClient<RecoveryServicesBackupClient>(
120+
AzureSession.Instance.ClientFactory.CreateArmClient<RecoveryServicesBackupClient>(
122121
defaultContext, AzureEnvironment.Endpoint.ResourceManager);
123122

124-
resourceManagementClient = AzureSession.ClientFactory.CreateArmClient<ResourceManagementClient>(defaultContext, AzureEnvironment.Endpoint.ResourceManager);
123+
resourceManagementClient = AzureSession.Instance.ClientFactory.CreateArmClient<ResourceManagementClient>(defaultContext, AzureEnvironment.Endpoint.ResourceManager);
125124
}
126125

127126
private static bool IgnoreCertificateErrorHandler

src/RecoveryServices/RecoveryServices/RecoveryServices.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
<PackageReference Include="System.Security.Cryptography.Cng" Version="4.4.0" />
1717
</ItemGroup>
1818

19-
<ItemGroup>
20-
<ProjectReference Include="..\..\Accounts\Authentication\Authentication.csproj" />
21-
</ItemGroup>
22-
2319
<ItemGroup>
2420
<Compile Update="Properties\Resources.Designer.cs">
2521
<DesignTime>True</DesignTime>

0 commit comments

Comments
 (0)