Wanted to cross-reference a similar implementation on SO - stackoverflow.com/a/59893520/968003.
BTW, in order to bring XML-docs add BuildOnlySettings to "Target DependsOnTargets". It also will add PDBs to *.snupkg if you generate one.
BuildOnlySettings
PDB
*.snupkg
So the final snippet looks like:
<PropertyGroup> <TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput> </PropertyGroup> <Target DependsOnTargets="BuildOnlySettings;ResolveReferences" Name="CopyProjectReferencesToPackage"> <ItemGroup> <BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" /> </ItemGroup> </Target>
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Wanted to cross-reference a similar implementation on SO - stackoverflow.com/a/59893520/968003.
BTW, in order to bring XML-docs add
BuildOnlySettingsto "Target DependsOnTargets". It also will addPDBs to*.snupkgif you generate one.So the final snippet looks like: