diff --git a/.vsts-ci/windows/templates/windows-packaging.yml b/.vsts-ci/windows/templates/windows-packaging.yml index 832fe73af..90655ee62 100644 --- a/.vsts-ci/windows/templates/windows-packaging.yml +++ b/.vsts-ci/windows/templates/windows-packaging.yml @@ -71,6 +71,14 @@ jobs: displayName: SBOM sourceScanPath: '$(repoPath)\tools' + # This is needed as SBOM task removed the installed .NET and installs .NET 3.1 + - pwsh: | + Import-Module .\tools\ci.psm1 + Invoke-CIInstall -SkipUser + displayName: Bootstrap + condition: succeeded() + workingDirectory: $(repoPath) + - pwsh: | Import-Module .\tools\ci.psm1 New-CodeCoverageAndTestPackage diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 28cb7bae6..daa493f19 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -2574,7 +2574,8 @@ function CleanupGeneratedSourceCode '[Microsoft.PowerShell.Commands.HttpVersionCompletionsAttribute]' '[System.Management.Automation.ArgumentToVersionTransformationAttribute]' '[Microsoft.PowerShell.Commands.InvokeCommandCommand.ArgumentToPSVersionTransformationAttribute]' - '[Microsoft.PowerShell.Commands.InvokeCommandCommand.ValidateVersionAttribute]' + '[Microsoft.PowerShell.Commands.InvokeCommandCommand.ValidateVersionAttribute]', + '[System.Management.Automation.OutputTypeAttribute(new System.Type[]{ typeof(Microsoft.PowerShell.Commands.Internal.Format.FormatStartData), typeof(Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData), typeof(Microsoft.PowerShell.Commands.Internal.Format.FormatEndData), typeof(Microsoft.PowerShell.Commands.Internal.Format.GroupStartData), typeof(Microsoft.PowerShell.Commands.Internal.Format.GroupEndData)})]' ) $patternsToReplace = @(