Skip to content

Commit

Permalink
try'n'a get the XPackageReferences to work..
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmjr committed Dec 31, 2023
1 parent 61c5ab5 commit e5a5462
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 24 deletions.
6 changes: 3 additions & 3 deletions src/Build/AIsMultiTargeting.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-->

<Project>
<PropertyGroup>
<IsMultitargeting>$('$(TargetFrameworks)' != '' And '$(TargetFramework)' == '')</IsMultitargeting>
</PropertyGroup>
<PropertyGroup>
<IsMultitargeting>$('$(TargetFrameworks)' != '' And '$(TargetFramework)' == '')</IsMultitargeting>
</PropertyGroup>
</Project>
39 changes: 39 additions & 0 deletions src/Build/CustomItemTypes.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project InitialTargets="MakeProjectReferenceItemsFromCustomItemReferenceTypes">
<ItemDefinitionGroup>
<SourceGeneratorPackageReference>
<CopyLocal>true</CopyLocal>
<ExcludeAssets>Native;BuildTransitive;BuildMultitargeting;ContentFiles;Compile;Runtime</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>Analyzers;Build</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>All</PrivateAssets>
</SourceGeneratorPackageReference>
<SourceGeneratorProjectReference>
<CopyLocal>true</CopyLocal>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
<GeneratePathProperty>true</GeneratePathProperty>
<OutputItemType>Analyzer</OutputItemType>
<Pack>true</Pack>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SetConfiguration>Configuration=$(Configuration)</SetConfiguration>
<Targets>Restore;Build;Pack</Targets>
</SourceGeneratorProjectReference>
<SourceCodePackageReference>
<CopyLocal>true</CopyLocal>
<ExcludeAssets>Analyzers;Runtime;Native</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>ContentFiles;Build;BuildTransitive;BuildMultitargeting</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>All</PrivateAssets>
</SourceCodePackageReference>
<UsingsPackageReference>
<CopyLocal>true</CopyLocal>
<ExcludeAssets>ContentFiles;Native;Analyzers</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>Build;BuildTransitive;BuildMultitargeting;Runtime;Compile</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>None</PrivateAssets>
</UsingsPackageReference>
</ItemDefinitionGroup>
</Project>
39 changes: 39 additions & 0 deletions src/Build/CustomItemTypes.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project>
<ItemGroup>
<PackageReference Include="@(SourceGeneratorPackageReference)">
<CopyLocal>true</CopyLocal>
<ExcludeAssets>Native;BuildTransitive;BuildMultitargeting;ContentFiles;Compile;Runtime</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>Analyzers;Build</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<ProjectReference Include="@(SourceGeneratorProjectReference)">
<CopyLocal>true</CopyLocal>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
<GeneratePathProperty>true</GeneratePathProperty>
<OutputItemType>Analyzer</OutputItemType>
<Pack>true</Pack>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SetConfiguration>Configuration=$(Configuration)</SetConfiguration>
<Targets>Restore;Build;Pack</Targets>
</ProjectReference>
<PackageReference Include="@(SourceCodePackageReference)">
<CopyLocal>true</CopyLocal>
<ExcludeAssets>Analyzers;Runtime;Native</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>ContentFiles;Build;BuildTransitive;BuildMultitargeting</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="@(UsingsPackageReference)">
<CopyLocal>true</CopyLocal>
<ExcludeAssets>ContentFiles;Native;Analyzers</ExcludeAssets>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>Build;BuildTransitive;BuildMultitargeting;Runtime;Compile</IncludeAssets>
<Pack>true</Pack>
<PrivateAssets>None</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>
6 changes: 4 additions & 2 deletions src/Build/EnsureLicense.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@

<Project>
<Target Name="EnsureLicenseFileExists" BeforeTargets="Pack" Condition="!$(LicenseFileExists)">
<Copy SourceFiles="$(MSBuildThisFileDirectory)../LICENSE.md"
DestinationFolder="$(MSBuildProjectDirectory)" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)../LICENSE.md" DestinationFolder="$(MSBuildProjectDirectory)" />
<PropertyGroup>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
</PropertyGroup>
</Target>
<ItemGroup>
<EmbeddedResource Include="$(PackageLicenseFile)" />
</ItemGroup>
</Project>
38 changes: 19 additions & 19 deletions src/Build/GenerateMarkdownDocs.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
* GenerateMarkdownDocs.targets
*
*
* Created: 2023-01-03-03:19:47
* Modified: 2023-01-03-03:19:47
*
*
* 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 @@ -17,23 +17,23 @@
<ItemGroup>
<DocsParameter Include="generate-doc" />
<DocsParameter Include="'$(MSBuildProjectFullPath)'" />
<DocsParameter Include="==additional-xml-documentation './**/*.xml'" />
<DocsParameter Include="==file-log '$(FileLog)'" />
<DocsParameter Include="==file-log-verbosity diagnostic" />
<DocsParameter Include="==verbosity diagnostic" />
<DocsParameter Include="==additional-xml-documentation './**/*.xml'" />
<DocsParameter Include="==file-log '$(FileLog)'" />
<DocsParameter Include="==file-log-verbosity diagnostic" />
<DocsParameter Include="==verbosity diagnostic" />
<DocsParameter Include="==files-layout flat-namespaces" />
<DocsParameter Include="==group-by-common-namespace" />
<DocsParameter Include="==heading '$(Title)'" />
<DocsParameter Include="==inheritance-style horizontal" />
<DocsParameter Include="==host github" />
<DocsParameter Include="==ignored-names 'ThisAssembly'" />
<DocsParameter Include="==include-all-derived-types" />
<DocsParameter Include="==include-containing-namespace all" />
<DocsParameter Include="==include-ienumerable" />
<DocsParameter Include="==include-inherited-interface-members" />
<DocsParameter Include="==include-system-namespace" />
<DocsParameter Include="==max-derived-types 100" />
<DocsParameter Include="==output '$(DocsDir)'" />
<DocsParameter Include="==group-by-common-namespace" />
<DocsParameter Include="==heading '$(Title)'" />
<DocsParameter Include="==inheritance-style horizontal" />
<DocsParameter Include="==host github" />
<DocsParameter Include="==ignored-names 'ThisAssembly'" />
<DocsParameter Include="==include-all-derived-types" />
<DocsParameter Include="==include-containing-namespace all" />
<DocsParameter Include="==include-ienumerable" />
<DocsParameter Include="==include-inherited-interface-members" />
<DocsParameter Include="==include-system-namespace" />
<DocsParameter Include="==max-derived-types 100" />
<DocsParameter Include="==output '$(DocsDir)'" />
</ItemGroup>
<Target Name="GenDocs">
<MakeDir Directories="$(DocsDir)" />
Expand Down
3 changes: 3 additions & 0 deletions src/Build/PackOverride.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project Condition="!$(GeneratePackageOnBuild)">
<Target Name="Pack" DependsOnTargets="$(PackDependsOn)" AfterTargets="$(PackDependsOn)" />
</Project>

0 comments on commit e5a5462

Please sign in to comment.