"solution": "$(PB_SourcesDirectory)\\publish\\publish.proj",
"platform": "$(PB_TargetArchitecture)",
"configuration": "$(BuildConfiguration)",
- "msbuildArguments": "/p:Configuration=$(BuildConfiguration) $(PB_CommonMSBuildArgs) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:GitHubUser=$(PB_GitHubUser) /p:GitHubEmail=$(PB_GitHubEmail) /p:GitHubAuthToken=$(GITHUB_PASSWORD) /p:VersionsRepoOwner=$(PB_VersionsRepoOwner) /p:VersionsRepo=$(PB_VersionsRepo) /p:VersionsRepoPath=build-info/dotnet/$(PB_RepoName)/$(SourceBranch) /p:Finalize=true /p:VsoToolsDir=$(PB_VsoToolsDir) /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log",
+ "msbuildArguments": "/p:Configuration=$(BuildConfiguration) $(PB_CommonMSBuildArgs) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:GitHubUser=$(PB_GitHubUser) /p:GitHubEmail=$(PB_GitHubEmail) /p:GitHubAuthToken=$(GITHUB_PASSWORD) /p:VersionsRepoOwner=$(PB_VersionsRepoOwner) /p:VersionsRepo=$(PB_VersionsRepo) /p:VersionsRepoPath=build-info/dotnet/$(PB_RepoName)/$(SourceBranch) /p:Finalize=true /p:DotNetToolDir=$(DotNetToolDir) /p:EmbedIndexToolDir=$(EmbedIndexToolDir) /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log",
"clean": "false",
"maximumCpuCount": "false",
"restoreNugetPackages": "false",
<!-- if we're not signing packages, publish directly from the download directory, as we won't be
copying them to the indexed directory -->
<PublishDirectory Condition="'$(WindowsSdkDir)' == ''">$(DownloadDirectory)</PublishDirectory>
- <!-- list of packages that we want to embed symbol signatures in -->
- <SymbolPackagesToPublishGlob Condition="'$(SymbolPackagesToPublishGlob)' == ''">$(DownloadDirectory)/**/*.nupkg</SymbolPackagesToPublishGlob>
</PropertyGroup>
<MakeDir Directories="$(DownloadDirectory)"
Condition="!Exists('$(DownloadDirectory)')" />
</ItemGroup>
</Target>
- <Target Name="SignSymbolPackages" DependsOnTargets="InjectSignedSymbolCatalogIntoSymbolPackages" Condition="'$(WindowsSdkDir)' != ''">
+ <Target Name="FindDownloadedPackagesForSigning">
<PropertyGroup>
- <PowerShellExe Condition=" '$(PowerShellExe)'=='' ">powershell.exe</PowerShellExe>
- <EmbedIndexScriptLocation Condition=" '$(EmbedIndexScriptLocation)'=='' ">$(VsoToolsDir)\scripts\DotNet-Trusted-Publish\Embed-Index.ps1</EmbedIndexScriptLocation>
+ <!-- Glob matching packages that we want to embed symbol signatures in. Used in BuildTools. -->
+ <SymbolPackagesToPublishGlob Condition="'$(SymbolPackagesToPublishGlob)' == ''">$(DownloadDirectory)**\*.symbols.nupkg</SymbolPackagesToPublishGlob>
</PropertyGroup>
- <Exec Command="$(PowerShellExe) -NonInteractive -ExecutionPolicy Unrestricted -Command "& { &'$(EmbedIndexScriptLocation)' $(DownloadDirectory) $(PublishDirectory) } "" />
+ <ItemGroup>
+ <SymbolPackagesToEmbedIndex Include="$(SymbolPackagesToPublishGlob)" />
+ <NormalPackagesToNotEmbedIndex Include="$(DownloadDirectory)**\*.nupkg"
+ Exclude="@(SymbolPackagesToEmbedIndex)" />
+ </ItemGroup>
+
+ <!-- Copy any nupkgs we skip running EmbedIndex on directly to the output folder. -->
+ <Copy SourceFiles="@(NormalPackagesToNotEmbedIndex)"
+ DestinationFolder="$(PublishDirectory)" />
+ </Target>
+
+ <Target Name="SignSymbolPackages"
+ DependsOnTargets="FindDownloadedPackagesForSigning;InjectSignedSymbolCatalogIntoSymbolPackages"
+ Condition="'$(WindowsSdkDir)' != ''">
+ <ItemGroup>
+ <EmbedIndexArgPairs Include="@(SymbolPackagesToEmbedIndex -> '%(Identity) $(PublishDirectory)%(Filename)%(Extension)')" />
+ </ItemGroup>
+
+ <!-- Inline the EmbedIndex.ps1 script used in CoreFX and CoreCLR: directly call EmbedIndex. -->
+ <Exec Command="$(DotNetToolDir)\dotnet $(EmbedIndexToolDir)\tools\EmbedIndex.dll %(EmbedIndexArgPairs.Identity)" />
</Target>
<Target Name="DoPushCoreHostPackagesToFeed">