Created
January 11, 2019 08:36
-
-
Save bail16/b0815e9d959aa960a8e4c7e015b70270 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="CopyPdbToPackage" Inputs="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" Outputs="%(ProjectReference.Identity)" | |
AfterTargets="CopyProjectReferencesToPackage"> | |
<PropertyGroup> | |
<CurrentReference>%(ProjectReference.Identity)</CurrentReference> | |
<CurrentReferenceName>$([System.IO.Path]::GetFileNameWithoutExtension($(CurrentReference)))</CurrentReferenceName> | |
</PropertyGroup> | |
<Message Text="Copying PDB of $(CurrentReferenceName) to packages..." Importance="high" Condition="'%(ProjectReference.NugetIgnore)'!='true'"/> | |
<ItemGroup> | |
<AllItems Include="@(ReferenceCopyLocalPaths->WithMetadataValue('OriginalProjectReferenceItemSpec', '$(CurrentReference)'))"/> | |
<PdbFiles Include="%(AllItems.Identity)" Condition="@(AllItems->EndsWith('.pdb'))=='true'" /> | |
</ItemGroup> | |
<ItemGroup> | |
<TfmSpecificPackageFile Include="@(PdbFiles)" Condition="'%(ProjectReference.NugetIgnore)'!='true'"> | |
<PackagePath>lib/$(TargetFramework)</PackagePath> | |
</TfmSpecificPackageFile> | |
</ItemGroup> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment