Strip duplicates from BuiltProjectOutputGroupOutput (#25785)

This commit is contained in:
William Godbe 2020-09-11 10:11:10 -07:00 committed by GitHub
parent c32089a5e2
commit 84962660a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -281,21 +281,22 @@ This package is an internal implementation of the .NET Core SDK and is not meant
<!-- This target resolves files into the BuiltProjectOutputGroupOutput which NuGet uses to generate the package files. --> <!-- This target resolves files into the BuiltProjectOutputGroupOutput which NuGet uses to generate the package files. -->
<Target Name="_ResolveRuntimePackBuildOutput" DependsOnTargets="ResolveReferences;Crossgen"> <Target Name="_ResolveRuntimePackBuildOutput" DependsOnTargets="ResolveReferences;Crossgen">
<ItemGroup> <ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectDepsFilePath)" /> <BuildOutputFiles Include="$(ProjectDepsFilePath)" />
<BuiltProjectOutputGroupOutput Include="@(ReferenceCopyLocalPaths)" Condition=" '%(ReferenceCopyLocalPaths.IsNativeImage)' != 'true' " /> <BuildOutputFiles Include="@(ReferenceCopyLocalPaths)" Condition=" '%(ReferenceCopyLocalPaths.IsNativeImage)' != 'true' " />
<!-- Include all .pdbs in build output. Some .pdb files are part of ReferenceCopyLocalPaths, but this can change when running /t:Pack /p:NoBuild=true. --> <!-- Include all .pdbs in build output. Some .pdb files are part of ReferenceCopyLocalPaths, but this can change when running /t:Pack /p:NoBuild=true. -->
<BuiltProjectOutputGroupOutput Include="$(TargetDir)*.pdb" Exclude="@(ReferenceCopyLocalPaths)" /> <BuildOutputFiles Include="$(TargetDir)*.pdb" Exclude="@(ReferenceCopyLocalPaths)" />
<!-- Crossgen symbols for Linux include a GUID in the file name which cannot be predicted. --> <!-- Crossgen symbols for Linux include a GUID in the file name which cannot be predicted. -->
<BuiltProjectOutputGroupOutput Include="$(TargetDir)*.map" Condition="'$(CrossGenSymbolsType)' == 'PerfMap'" /> <BuildOutputFiles Include="$(TargetDir)*.map" Condition="'$(CrossGenSymbolsType)' == 'PerfMap'" />
<!-- Strip duplicate Files by checking for distinct %(FileName)%(Extension) --> <!-- Strip duplicate Files by checking for distinct %(FileName)%(Extension) -->
<OutputFileNames Include="%(BuiltProjectOutputGroupOutput.FileName)%(BuiltProjectOutputGroupOutput.Extension)"> <OutputFileNames Include="%(BuildOutputFiles.FileName)%(BuildOutputFiles.Extension)">
<ItemPath>%(BuiltProjectOutputGroupOutput.Identity)</ItemPath> <ItemPath>%(BuildOutputFiles.Identity)</ItemPath>
</OutputFileNames> </OutputFileNames>
<DistinctOutputFileNames Include="@(OutputFileNames->Distinct())"></DistinctOutputFileNames> <DistinctOutputFileNames Include="@(OutputFileNames->Distinct())"></DistinctOutputFileNames>
<NuGetPackInput Include="%(DistinctOutputFileNames.ItemPath)" /> <!--BuiltProjectOutputGroupOuput is the item actually used by Nuget -->
<BuiltProjectOutputGroupOutput Include="%(DistinctOutputFileNames.ItemPath)" />
<NuGetPackInput Include="@(BuiltProjectOutputGroupOutput)" />
</ItemGroup> </ItemGroup>
</Target> </Target>