Skip to content

Commit e9fd3d9

Browse files
dolauliazurepowershell
andauthored
Sync tools folder from main branch to generation branch (#17449)
Co-authored-by: azurepowershell <[email protected]>
1 parent 4e07e84 commit e9fd3d9

File tree

103 files changed

+87647
-96015
lines changed

Some content is hidden

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

103 files changed

+87647
-96015
lines changed

.azure-pipelines/powershell-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ variables:
55
LinuxImage: ubuntu-20.04
66
MacOSName: macOS
77
MacOSImage: macOS-11
8-
TestFramework: netcoreapp2.1
8+
TestFramework: netcoreapp3.1
99
TestTarget: Test
1010
Configuration: Debug
1111
DebugLocalBuildTasks: true

.azure-pipelines/util/test-steps.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ steps:
2424
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
2525
pwsh: true
2626

27-
- task: UseDotNet@2
28-
displayName: 'Use .NET Core sdk'
29-
inputs:
30-
packageType: sdk
31-
version: 2.1.x
32-
3327
- task: UseDotNet@2
3428
displayName: 'Use .NET Core sdk'
3529
inputs:

.azure-pipelines/windows-powershell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
variables:
22
WindowsName: windows
33
WindowsImage: windows-2019
4-
TestFramework: netcoreapp2.1
4+
TestFramework: netcoreapp3.1
55
TestTarget: Test
66
Configuration: Debug
77
DebugLocalBuildTasks: true

src/Az.Test.props

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
<!-- Build -->
1313
<PropertyGroup>
14-
<TargetFramework>netcoreapp2.1</TargetFramework>
14+
<TargetFramework>netcoreapp3.1</TargetFramework>
1515
<AssemblyName>$(AzAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</AssemblyName>
1616
<RootNamespace>$(AzAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</RootNamespace>
1717
<IsPackable>false</IsPackable>
18+
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
1819
</PropertyGroup>
1920

2021
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -25,10 +26,6 @@
2526
<DefineConstants>TRACE;RELEASE;NETSTANDARD</DefineConstants>
2627
</PropertyGroup>
2728

28-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
29-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
30-
</PropertyGroup>
31-
3229
<ItemGroup Condition="'$(IncludeCommonTestProject)' != 'false'">
3330
<ProjectReference Include="$(RepoTools)ScenarioTest.ResourceManager\ScenarioTest.ResourceManager.csproj" />
3431
<ProjectReference Include="$(RepoTools)TestFx\TestFx.csproj" />
416 KB
Binary file not shown.
-6.81 KB
Binary file not shown.

src/psm1.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<Target Name="AddAccountsPsm1Dependency" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'">
3+
<Exec Command="pwsh -NonInteractive -NoLogo -NoProfile -Command &quot;. '$(OutDir)../../../tools/AddModulePsm1Dependency.ps1' -ModuleFolder '$(OutDir)' -IgnorePwshVersion &quot;" />
4+
</Target>
5+
</Project>

tools/Az.Tools.Installer/internal/Install-AzModuleInternal.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function Install-AzModuleInternal {
5454
process {
5555

5656
try {
57-
Write-Progress -Id $script:FixProgressBarId "Download packagkes from $Repository."
57+
Write-Progress -Id $script:FixProgressBarId "Download packages from $Repository."
5858

5959
if ($Force -or !$WhatIfPreference) {
6060
[string]$tempRepo = Join-Path ([Path]::GetTempPath()) ((New-Guid).Guid)
@@ -99,7 +99,7 @@ function Install-AzModuleInternal {
9999
}
100100
}
101101

102-
Write-Progress -Id $script:FixProgressBarId "Install packagkes from local."
102+
Write-Progress -Id $script:FixProgressBarId "Install packages from local."
103103

104104
$moduleInstalled = @()
105105

tools/Az.Tools.Installer/internal/Install-SingleModuleFromPackage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Install-SingleModuleFromPackage{
6262
$downloader.Dispose()
6363
}
6464

65-
Write-Progress -Id $script:FixProgressBarId "Install packagkes from local."
65+
Write-Progress -Id $script:FixProgressBarId "Install packages from local."
6666

6767
$InstallStarted = Get-Date
6868
Write-Debug "[$Invoker] Will install $moduleName"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netstandard2.0</TargetFramework>
4+
<AssemblyName>Microsoft.Azure.PowerShell.Tools.AzPredictor.SourceGenerator</AssemblyName>
5+
<RootNamespace>Microsoft.Azure.PowerShell.Tools.AzPredictor.SourceGenerator</RootNamespace>
6+
<RepoArtifacts>$(MSBuildThisFileDirectory)</RepoArtifacts>
7+
<OutputPath>$(RepoArtifacts)..\..\..\artifacts\Tools\Az.Tools.Predictor.SourceGenerator\</OutputPath>
8+
</PropertyGroup>
9+
10+
<PropertyGroup>
11+
<!--
12+
- IsRoslyComponent helps to debug the source generator in Visual Studio. To debug it:
13+
- 1. Install the component ".NET compiler platform SDK"
14+
- 2. Set the this project as startup project
15+
- 3. Configure this project's debug launch profiles: Add an new "Roslyn Component" profile and set the Target Project to Az.Tools.Predictor
16+
-->
17+
<IsRoslynComponent>true</IsRoslynComponent>
18+
</PropertyGroup>
19+
20+
<PropertyGroup>
21+
<DocumentationFile>$(OutputPath)\Microsoft.Azure.PowerShell.Tools.AzPredictor.SourceGenerator.xml</DocumentationFile>
22+
<PackageId>Az.Tools.Predictor.SourceGenerator</PackageId>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" />
27+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
28+
</ItemGroup>
29+
30+
<!-- The generator projects specific dependencies needs to be added to PackageReference and TargetPathWithTargetPlatformMonikor -->
31+
32+
<ItemGroup>
33+
<PackageReference Include="System.Text.Json" Version="6.0.0" GeneratePathProperty="true" PrivateAssets="all"/>
34+
</ItemGroup>
35+
36+
<PropertyGroup>
37+
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
38+
</PropertyGroup>
39+
40+
<Target Name="GetDependencyTargetPaths" AfterTargets="ResolvePackageDependenciesForBuild">
41+
<ItemGroup>
42+
<!-- We need to add all the (direct and indirect) dependencies. @(ResolvedCompileFileDefinitions) is a way to get that.
43+
- See more about Transient Dependencies here https://turnerj.com/blog/the-pain-points-of-csharp-source-generators
44+
-->
45+
<TargetPathWithTargetPlatformMoniker Include="@(ResolvedCompileFileDefinitions)" IncludeRuntimeDependency="false" />
46+
</ItemGroup>
47+
</Target>
48+
</Project>

0 commit comments

Comments
 (0)