Skip to content

Commit

Permalink
CustomBeforeCentralPackageVersions.ta
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmjr committed Oct 5, 2023
1 parent a82cd24 commit 30c7541
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,31 @@
-->

<Project>
<!-- Transforms <SourceGenerator /> items into <PackageReference /> items with appropriate includes/excludes -->
<!-- Transforms <SourceGeneratorPackageReference /> items into <PackageReference /> items with appropriate includes/excludes -->
<ItemGroup>
<PackageReference Include="@(SourceGenerator)">
<PackageReference Include="@(SourceGeneratorPackageReference)">
<IncludeAssets>Analyzers;Build</IncludeAssets>
<ExcludeAssets>Native;BuildTransitive;BuildMultitargeting;ContentFiles;Compile;Runtime</ExcludeAssets>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<SourceGenerator Remove="@(SourceGenerator)" />
<SourceGeneratorPackageReference Remove="@(SourceGeneratorPackageReference)" />
</ItemGroup>
<!-- Transforms <SourceCodeReference /> items into <PackageReference /> items with appropriate includes/excludes -->
<!-- Transforms <SourceGeneratorProjectReference /> items into <ProjectReference /> items with appropriate properties -->
<ItemGroup>
<PackageReference Include="@(SourceCodeReference)">
<ProjectReference Include="@(SourceGeneratorProjectReference)">
<OutputItemType>Analyzer</OutputItemType>
<Targets>Restore;Build;Pack</Targets>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<!-- Transforms <SourceCodePackageReference /> items into <PackageReference /> items with appropriate includes/excludes -->
<ItemGroup>
<PackageReference Include="@(SourceCodePackageReference)">
<IncludeAssets>ContentFiles;Build;BuildTransitive;BuildMultitargeting</IncludeAssets>
<ExcludeAssets>Analyzers;Runtime;Native</ExcludeAssets>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<SourceCodeReference Remove="@(SourceCodeReference)" />
<SourceCodePackageReference Remove="@(SourceCodePackageReference)" />
</ItemGroup>
<!-- Transforms <UsingsPackageReference /> items into <PackageReference /> items with appropriate includes/excludes -->
<ItemGroup>
Expand All @@ -36,5 +44,6 @@
<ExcludeAssets>ContentFiles;Native;Compile</ExcludeAssets>
<PrivateAssets>None</PrivateAssets>
</PackageReference>
<UsingsPackageReference Remove="@(UsingsPackageReference)" />
</ItemGroup>
</Project>
7 changes: 4 additions & 3 deletions src/Build/CustomBeforeAndAfterCentralPackageVersions.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
CustomBeforeAndAfterCentralPackageVersions.props
Created: 2022-10-22-06:23:58
Modified: 2022-10-29-02:47:31
Author: David G. Moore, Jr. <[email protected]>
Copyright © 2022-2023 David G. Moore, Jr., All Rights Reserved
License: MIT (https://opensource.org/licenses/MIT)
-->
Expand All @@ -18,6 +18,7 @@
</CustomBeforeCentralPackageVersionsProps>
<CustomAfterCentralPackageVersionsProps Condition="Exists($([MSBuild]::GetPathOfFileAbove('Directory.CustomAfterCentralPackageVersions.props')))">
$(CustomAfterCentralPackageVersionsProps);
$(MSBuildThisFilePath)/Custom/CustomBeforeCentralPackageVersions.targets;
$([MSBuild]::GetPathOfFileAbove("Directory.CustomAfterCentralPackageVersions.props"))
</CustomAfterCentralPackageVersionsProps>
</PropertyGroup>
Expand Down

0 comments on commit 30c7541

Please sign in to comment.