Skip to content

Commit 4d69837

Browse files
authored
Merge pull request #5782 from MiYanni/NetCoreFixBroken
Fixed failed NetCore conversions
2 parents 7dd0254 + e1720ae commit 4d69837

File tree

122 files changed

+5425
-1107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+5425
-1107
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,6 @@ Package
228228
.idea
229229
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Logger/bin
230230
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/bin
231+
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/bin
232+
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Providers/bin
233+
/src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.ServiceClientAdapter/bin

Azure.PowerShell.Netcore.sln

Lines changed: 350 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
#
2+
# Module manifest for module 'Azure.AnalysisServices.Netcore'
3+
#
4+
# Generated by: Microsoft Corporation
5+
#
6+
# Generated on: 3/15/2018
7+
#
8+
9+
@{
10+
11+
# Script module or binary module file associated with this manifest.
12+
# RootModule = ''
13+
14+
# Version number of this module.
15+
ModuleVersion = '0.10.0'
16+
17+
# Supported PSEditions
18+
CompatiblePSEditions = 'Core'
19+
20+
# ID used to uniquely identify this module
21+
GUID = 'c717b5a4-1f1b-4a2f-8aa1-bfd09934626e'
22+
23+
# Author of this module
24+
Author = 'Microsoft Corporation'
25+
26+
# Company or vendor of this module
27+
CompanyName = 'Microsoft Corporation'
28+
29+
# Copyright statement for this module
30+
Copyright = 'Microsoft Corporation. All rights reserved.'
31+
32+
# Description of the functionality provided by this module
33+
Description = '[PowerShell .Net Core] Microsoft Azure PowerShell - Analysis Services server management'
34+
35+
# Minimum version of the Windows PowerShell engine required by this module
36+
PowerShellVersion = '5.1'
37+
38+
# Name of the Windows PowerShell host required by this module
39+
# PowerShellHostName = ''
40+
41+
# Minimum version of the Windows PowerShell host required by this module
42+
# PowerShellHostVersion = ''
43+
44+
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45+
# DotNetFrameworkVersion = ''
46+
47+
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48+
# CLRVersion = ''
49+
50+
# Processor architecture (None, X86, Amd64) required by this module
51+
# ProcessorArchitecture = ''
52+
53+
# Modules that must be imported into the global environment prior to importing this module
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile.Netcore'; ModuleVersion = '0.10.0'; })
55+
56+
# Assemblies that must be loaded prior to importing this module
57+
RequiredAssemblies = @()
58+
59+
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60+
# ScriptsToProcess = @()
61+
62+
# Type files (.ps1xml) to be loaded when importing this module
63+
# TypesToProcess = @()
64+
65+
# Format files (.ps1xml) to be loaded when importing this module
66+
# FormatsToProcess = @()
67+
68+
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69+
NestedModules = @('.\Microsoft.Azure.Commands.AnalysisServices.Dataplane.dll')
70+
71+
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72+
FunctionsToExport = '*'
73+
74+
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75+
CmdletsToExport = 'Add-AzureAnalysisServicesAccount',
76+
'Restart-AzureAnalysisServicesInstance',
77+
'Export-AzureAnalysisServicesInstanceLog',
78+
'Sync-AzureAnalysisServicesInstance'
79+
80+
# Variables to export from this module
81+
VariablesToExport = '*'
82+
83+
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
84+
AliasesToExport = '*'
85+
86+
# DSC resources to export from this module
87+
# DscResourcesToExport = @()
88+
89+
# List of all modules packaged with this module
90+
# ModuleList = @()
91+
92+
# List of all files packaged with this module
93+
# FileList = @()
94+
95+
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
96+
PrivateData = @{
97+
98+
PSData = @{
99+
100+
# Tags applied to this module. These help with module discovery in online galleries.
101+
Tags = "Azure", "AzureAS", "AS"
102+
103+
# A URL to the license for this module.
104+
LicenseUri = 'https://aka.ms/azps-license'
105+
106+
# A URL to the main website for this project.
107+
ProjectUri = 'https://github.com/Azure/azure-powershell'
108+
109+
# A URL to an icon representing this module.
110+
# IconUri = ''
111+
112+
# ReleaseNotes of this module
113+
ReleaseNotes = ''
114+
115+
# Prerelease string of this module
116+
# Prerelease = ''
117+
118+
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
119+
# RequireLicenseAcceptance = $false
120+
121+
# External dependent modules of this module
122+
# ExternalModuleDependencies = @()
123+
124+
} # End of PSData hashtable
125+
126+
} # End of PrivateData hashtable
127+
128+
# HelpInfo URI of this module
129+
# HelpInfoURI = ''
130+
131+
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
132+
# DefaultCommandPrefix = ''
133+
134+
}
135+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<Import Project="..\..\..\..\tools\Common.Netcore.Dependencies.targets" />
4+
5+
<PropertyGroup>
6+
<TargetFramework>netcoreapp2.0</TargetFramework>
7+
<AssemblyName>Microsoft.Azure.Commands.AnalysisServices.Dataplane</AssemblyName>
8+
<RootNamespace>Microsoft.Azure.Commands.AnalysisServices.Dataplane</RootNamespace>
9+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
10+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
11+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
12+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
13+
</PropertyGroup>
14+
15+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
16+
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Azure.AnalysisServices.Netcore\</OutputPath>
17+
<DelaySign>false</DelaySign>
18+
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
19+
</PropertyGroup>
20+
21+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
22+
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\Azure.AnalysisServices.Netcore\</OutputPath>
23+
<DocumentationFile />
24+
<SignAssembly>true</SignAssembly>
25+
<DelaySign>true</DelaySign>
26+
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
27+
<DefineConstants>TRACE;RELEASE;NETSTANDARD;SIGN</DefineConstants>
28+
</PropertyGroup>
29+
30+
<ItemGroup>
31+
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.10" />
32+
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="3.3.10" />
33+
<PackageReference Include="Microsoft.WindowsAzure.Management" Version="4.1.1" />
34+
</ItemGroup>
35+
36+
<ItemGroup>
37+
<None Include="Azure.AnalysisServices.Netcore.psd1">
38+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
39+
</None>
40+
</ItemGroup>
41+
42+
<ItemGroup>
43+
<ProjectReference Include="..\..\..\Common\Commands.Common.Authentication.Abstractions\Common.Authentication.Abstractions.Netcore.csproj" />
44+
<ProjectReference Include="..\..\..\Common\Commands.Common\Common.Netcore.csproj" />
45+
</ItemGroup>
46+
47+
<ItemGroup>
48+
<Compile Update="Properties\Resources.Designer.cs">
49+
<DesignTime>true</DesignTime>
50+
<AutoGen>true</AutoGen>
51+
<DependentUpon>Resources.resx</DependentUpon>
52+
</Compile>
53+
</ItemGroup>
54+
55+
<ItemGroup>
56+
<EmbeddedResource Update="Properties\Resources.resx">
57+
<Generator>ResXFileCodeGenerator</Generator>
58+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
59+
</EmbeddedResource>
60+
</ItemGroup>
61+
62+
<ItemGroup>
63+
<Content Include="help\**\*" CopyToOutputDirectory="PreserveNewest" />
64+
</ItemGroup>
65+
66+
</Project>

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands.AnalysisServices.Dataplane.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<DelaySign>true</DelaySign>
3030
<DebugType>pdbonly</DebugType>
3131
<Optimize>true</Optimize>
32-
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\Azure.AnalysisServices</OutputPath>
32+
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\Azure.AnalysisServices\</OutputPath>
3333
<DefineConstants>TRACE</DefineConstants>
3434
<ErrorReport>prompt</ErrorReport>
3535
<WarningLevel>4</WarningLevel>

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/AddAzureASAccount.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,11 @@ public override void ExecuteCmdlet()
183183
{
184184
AsAzureClientSession.Instance.SetCurrentContext(azureAccount, AsEnvironment);
185185
}
186-
186+
#if NETSTANDARD
187+
var asAzureProfile = AsAzureClientSession.Instance.Login(currentProfile.Context, password, WriteWarning);
188+
#else
187189
var asAzureProfile = AsAzureClientSession.Instance.Login(currentProfile.Context, password);
190+
#endif
188191

189192
WriteObject(asAzureProfile);
190193
}

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/Export-AzureAsInstanceLog.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,14 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using System;
16-
using System.IO;
1716
using System.Globalization;
18-
using System.Linq;
1917
using System.Management.Automation;
20-
using System.Management.Instrumentation;
2118
using System.Net.Http;
2219
using System.Net.Http.Headers;
23-
using System.Threading.Tasks;
2420
using Microsoft.Azure.Commands.Common.Authentication;
2521
using Microsoft.Azure.Commands.AnalysisServices.Dataplane.Models;
2622
using Microsoft.Azure.Commands.AnalysisServices.Dataplane.Properties;
2723
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
28-
using Microsoft.Azure.Commands.Common.Authentication.Models;
29-
using Microsoft.IdentityModel.Clients.ActiveDirectory;
3024
using Microsoft.WindowsAzure.Commands.Utilities.Common;
3125
using Newtonsoft.Json.Linq;
3226

@@ -146,7 +140,11 @@ public override void ExecuteCmdlet()
146140
if (ShouldProcess(Instance, Resources.ExportingLogFromAnalysisServicesServer))
147141
{
148142
var context = AsAzureClientSession.Instance.Profile.Context;
143+
#if NETSTANDARD
144+
AsAzureClientSession.Instance.Login(context, null, null);
145+
#else
149146
AsAzureClientSession.Instance.Login(context, null);
147+
#endif
150148
string accessToken = this.TokenCacheItemProvider.GetTokenFromTokenCache(
151149
AsAzureClientSession.TokenCache, context.Account.UniqueId);
152150

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/Restart-AzureAsInstance.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,10 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using System;
16-
using System.Linq;
1716
using System.Management.Automation;
18-
using System.Management.Instrumentation;
1917
using System.Net.Http;
20-
using System.Net.Http.Headers;
21-
using System.Threading.Tasks;
2218
using Microsoft.Azure.Commands.AnalysisServices.Dataplane.Models;
2319
using Microsoft.Azure.Commands.AnalysisServices.Dataplane.Properties;
24-
using Microsoft.Azure.Commands.Common.Authentication.Models;
25-
using Microsoft.IdentityModel.Clients.ActiveDirectory;
2620
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2721
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
2822

@@ -137,7 +131,11 @@ public override void ExecuteCmdlet()
137131
if (ShouldProcess(Instance, Resources.RestartingAnalysisServicesServer))
138132
{
139133
var context = AsAzureClientSession.Instance.Profile.Context;
134+
#if NETSTANDARD
135+
AsAzureClientSession.Instance.Login(context, null, null);
136+
#else
140137
AsAzureClientSession.Instance.Login(context, null);
138+
#endif
141139
string accessToken = this.TokenCacheItemProvider.GetTokenFromTokenCache(AsAzureClientSession.TokenCache, context.Account.UniqueId);
142140

143141
Uri restartBaseUri = new Uri(string.Format("{0}{1}{2}", Uri.UriSchemeHttps, Uri.SchemeDelimiter, context.Environment.Name));

0 commit comments

Comments
 (0)