@@ -17,7 +17,7 @@ function Get-AllPackageInfoFromRepo($serviceDirectory)
1717 $shouldAddDevVersion = Get-Variable - Name ' addDevVersion' - ValueOnly - ErrorAction ' Ignore'
1818 $ServiceProj = Join-Path - Path $EngDir - ChildPath " service.proj"
1919 $outputFilePath = Join-Path ([System.IO.Path ]::GetTempPath()) " package-info-$ ( [System.Guid ]::NewGuid()) .txt"
20-
20+
2121 Write-Host " dotnet msbuild /nologo /t:GetPackageInfo "" $ServiceProj "" /p:ServiceDirectory=$serviceDirectory /p:AddDevVersion=$shouldAddDevVersion /p:OutputProjectInfoListFilePath="" $outputFilePath "" -tl:off"
2222
2323 dotnet msbuild `
@@ -77,8 +77,8 @@ function Get-AllPackageInfoFromRepo($serviceDirectory)
7777 }
7878 }
7979
80- # CheckAOTCompat logic: if set in CI.yml, respect that value;
81- # if artifact has baselined warnings, run AOT checks;
80+ # CheckAOTCompat logic: if set in CI.yml, respect that value;
81+ # if artifact has baselined warnings, run AOT checks;
8282 # otherwise use AotCompatOptOut from project settings
8383 $shouldAot = GetValueSafelyFrom- Yaml $ciProps.ParsedYml @ (" extends" , " parameters" , " CheckAOTCompat" )
8484 if ($null -ne $shouldAot ) {
@@ -157,22 +157,12 @@ function Get-dotnet-AdditionalValidationPackagesFromPackageSet($LocatedPackages,
157157 Write-Host " Calculating dependencies for $ ( $pkgProp.Name ) "
158158
159159 $outputFilePath = Join-Path $RepoRoot " _dependencylist.txt"
160- $buildOutputPath = Join-Path $RepoRoot " _dependencylistoutput.txt"
161160
162- try {
163- $command = " dotnet build /t:ProjectDependsOn ./eng/service.proj /p:TestDependsOnDependency=`" $TestDependsOnDependency `" /p:TestDependsIncludePackageRootDirectoryOnly=true /p:IncludeSrc=false " +
161+ $command = " dotnet build /t:ProjectDependsOn ./eng/service.proj /p:TestDependsOnDependency=`" $TestDependsOnDependency `" /p:TestDependsIncludePackageRootDirectoryOnly=true /p:IncludeSrc=false " +
164162 " /p:IncludeStress=false /p:IncludeSamples=false /p:IncludePerf=false /p:RunApiCompat=false /p:InheritDocEnabled=false /p:BuildProjectReferences=false" +
165- " /p:OutputProjectFilePath=`" $outputFilePath `" > $buildOutputPath 2>&1"
166-
167- Invoke-LoggedCommand $command | Out-Null
168- }
169- catch {
170- Write-Host " Failed calculating dependencies for '$TestDependsOnDependency '. Exit code $LASTEXITCODE ."
171- Write-Host " Dumping erroring build output."
172- Write-Host (Get-Content - Raw $buildOutputPath )
163+ " /p:OutputProjectFilePath=`" $outputFilePath `" "
173164
174- return @ ()
175- }
165+ Invoke-LoggedMsbuildCommand $command
176166
177167 if (Test-Path $outputFilePath ) {
178168 $dependentProjects = Get-Content $outputFilePath
0 commit comments