Skip to content

Commit

Permalink
Fix the issue of dll conflict between Az.Aks and Pester (#21502)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyunchi-ms authored Apr 12, 2023
1 parent 08139d2 commit 7e78670
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/Gen2Master/MoveFromGeneration2Master.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,16 @@ Function Move-Generation2MasterHybrid {
[string] $DestPath,
[string] $Psd1FolderPostfix
)
Import-Module "$DestPath\..\..\artifacts\Debug\Az.$ModuleName\Az.$ModuleName.psd1"
Update-MarkdownHelpModule -Path "$DestPath\$ModuleName$Psd1FolderPostfix\help" -RefreshModulePage -AlphabeticParamsOrder -UseFullTypeName -ExcludeDontShow
$psd1Path = "$DestPath\..\..\artifacts\Debug\Az.$ModuleName\Az.$ModuleName.psd1"
$assemblyToRemove = "YamlDotNet.dll"
$psd1Data = Import-PowerShellDataFile -Path $psd1Path
if ($psd1Data.ContainsKey('RequiredAssemblies') -and $psd1Data.RequiredAssemblies -contains $assemblyToRemove) {
$psd1Data.RequiredAssemblies = $psd1Data.RequiredAssemblies | Where-Object { $_ -ne $assemblyToRemove }
Update-ModuleManifest -Path $psd1Path -RequiredAssemblies $psd1Data.RequiredAssemblies
}
Import-Module $psd1Path
Import-Module platyPS
Update-MarkdownHelpModule -Path "$DestPath\$ModuleName$Psd1FolderPostfix\help" -RefreshModulePage -AlphabeticParamsOrder -UseFullTypeName -ExcludeDontShow
} -ArgumentList $ModuleName, $DestPath, $Psd1FolderPostfix

$job | Wait-Job | Receive-Job
Expand Down

0 comments on commit 7e78670

Please sign in to comment.